From 0ec3926cecc73c915ba3862edad33e3722f0cf83 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Mon, 10 May 2021 20:26:09 +0200 Subject: [PATCH] Added blend_weights for animations and animation_controllers --- .../1.10.0/animation_controller.json | 9 +++++++-- .../1.8.0/animation_controller.json | 11 ++++++++--- source/resource/entity/1.10.0/entity.json | 9 +++++---- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/source/resource/animation_controllers/1.10.0/animation_controller.json b/source/resource/animation_controllers/1.10.0/animation_controller.json index 0831819f..a6d43fa7 100644 --- a/source/resource/animation_controllers/1.10.0/animation_controller.json +++ b/source/resource/animation_controllers/1.10.0/animation_controller.json @@ -14,7 +14,12 @@ "description": "A object specification on how to transition", "maxProperties": 1, "minProperties": 1, - "additionalProperties": { "$ref": "../../../molang/1.8.0/string.json" } + "additionalProperties": { + "oneOf": [ + { "type": "string", "$ref": "../../../molang/1.8.0/string.json" }, + { "type": "number", "description": "A blend weight" } + ] + } } ] }, @@ -89,7 +94,7 @@ "title": "Animations", "description": "The animations definition for 1.10.0", "type": "array", - "items": { "$ref": "#/definitions/animationspec", "description": "TODO description: animations", "title": "Animations" } + "items": { "$ref": "#/definitions/animationspec", "title": "Animations" } }, "blend_transition": { "title": "Blend Transition", diff --git a/source/resource/animation_controllers/1.8.0/animation_controller.json b/source/resource/animation_controllers/1.8.0/animation_controller.json index 3d57d612..69bc7f6c 100644 --- a/source/resource/animation_controllers/1.8.0/animation_controller.json +++ b/source/resource/animation_controllers/1.8.0/animation_controller.json @@ -14,7 +14,12 @@ "description": "A object specification on how to transition", "maxProperties": 1, "minProperties": 1, - "additionalProperties": { "$ref": "../../../molang/1.8.0/string.json" } + "additionalProperties": { + "oneOf": [ + { "type": "string", "$ref": "../../../molang/1.8.0/string.json" }, + { "type": "number", "description": "A blend weight" } + ] + } } ] }, @@ -78,7 +83,7 @@ "title": "Animations", "description": "The animations definition for 1.10.0", "type": "array", - "items": { "$ref": "#/definitions/animationspec", "description": "TODO description: animations", "title": "Animations" } + "items": { "$ref": "#/definitions/animationspec", "title": "Animations" } }, "blend_transition": { "title": "Blend Transition", @@ -120,7 +125,7 @@ "description": "The transition definition for 1.8.0", "minProperties": 1, "type": "array", - "items": { "$ref": "#/definitions/animationspec", "description": "TODO description: transitions", "title": "Transitions" } + "items": { "$ref": "#/definitions/animationspec", "description": "The specification on when to transition to a new state", "title": "Transitions" } }, "variables": { "type": "object", diff --git a/source/resource/entity/1.10.0/entity.json b/source/resource/entity/1.10.0/entity.json index 0806380f..4ead89f1 100644 --- a/source/resource/entity/1.10.0/entity.json +++ b/source/resource/entity/1.10.0/entity.json @@ -84,7 +84,7 @@ "additionalProperties": false, "type": "object", "title": "Scripts", - "description": "TODO", + "description": "The place where variables, and animations / controller to be run is specified", "properties": { "animate": { "type": "array", @@ -101,9 +101,10 @@ "title": "Animation (Controller) Condition", "description": "A single animation or animation controller to run on condition", "additionalProperties": { - "type": "string", - "description": "A molang condition", - "title": "Molang" + "oneOf": [ + { "type": "string", "description": "A molang condition", "title": "Molang" }, + { "type": "number", "description": "Blend weight", "title": "Blend weight" } + ] } } ]