|
169 | 169 | }, |
170 | 170 | "rig": { |
171 | 171 | "type": "object", |
172 | | - "required": ["default_transforms", "node_map"], |
| 172 | + "required": ["node_map", "node_structure", "variants"], |
173 | 173 | "properties": { |
174 | | - "default_transforms": { |
175 | | - "type": "array", |
176 | | - "items": { "$ref": "#/definitions/nodeTransform" } |
177 | | - }, |
178 | 174 | "node_map": { |
179 | 175 | "type": "object", |
180 | 176 | "additionalProperties": false, |
|
315 | 311 | "nodeTransform": { |
316 | 312 | "type": "object", |
317 | 313 | "description": "The transformation of a node. Includes several different storage methods for the transformation. All of these methods contain the same data, it's up to the plugin developer to choose which method to use.", |
318 | | - "required": ["type", "name", "uuid", "matrix", "pos", "rot", "scale"], |
| 314 | + "required": ["matrix", "pos", "rot", "scale"], |
319 | 315 | "properties": { |
320 | | - "type": { |
321 | | - "type": "string", |
322 | | - "enum": [ |
323 | | - "bone", |
324 | | - "struct", |
325 | | - "camera", |
326 | | - "locator", |
327 | | - "text_display", |
328 | | - "item_display", |
329 | | - "block_display" |
330 | | - ] |
331 | | - }, |
332 | | - "name": { "type": "string" }, |
333 | | - "uuid": { "type": "string" }, |
334 | 316 | "matrix": { |
335 | 317 | "type": "array", |
336 | 318 | "description": "The transformation matrix of the node. The matrix is a 4x4 matrix in row-major order.", |
|
397 | 379 | }, |
398 | 380 | "name": { "type": "string" }, |
399 | 381 | "uuid": { "type": "string" }, |
400 | | - "parent": { "type": "string" } |
| 382 | + "parent": { "type": "string" }, |
| 383 | + "defaultTransform": { |
| 384 | + "$ref": "#/definitions/nodeTransform", |
| 385 | + "description": "The default transformation of the node." |
| 386 | + } |
401 | 387 | }, |
402 | 388 | "allOf": [ |
403 | 389 | { |
|
580 | 566 | } |
581 | 567 | }, |
582 | 568 | "bakedAnimations": { |
583 | | - "type": "array", |
584 | | - "items": { |
585 | | - "type": "object", |
586 | | - "required": [ |
587 | | - "name", |
588 | | - "storageSafeName", |
589 | | - "duration", |
590 | | - "loopDelay", |
591 | | - "loopMode", |
592 | | - "frames", |
593 | | - "includedNodes" |
594 | | - ], |
595 | | - "additionalProperties": false, |
596 | | - "properties": { |
597 | | - "name": { "type": "string" }, |
598 | | - "storageSafeName": { "type": "string" }, |
599 | | - "duration": { "type": "number" }, |
600 | | - "loopDelay": { "type": "number" }, |
601 | | - "loopMode": { "type": "string", "enum": ["none", "loop", "ping-pong"] }, |
602 | | - "includedNodes": { "type": "array", "items": { "type": "string" } }, |
603 | | - "frames": { |
604 | | - "type": "array", |
605 | | - "items": { |
606 | | - "type": "object", |
607 | | - "required": ["time", "node_transforms"], |
608 | | - "properties": { |
609 | | - "time": { "type": "number" }, |
610 | | - "node_transforms": { |
611 | | - "type": "array", |
612 | | - "items": { "$ref": "#/definitions/nodeTransform" } |
613 | | - }, |
614 | | - "variant": { |
615 | | - "type": "object", |
616 | | - "description": "If included, this frame should change the variant of the model to the specified variant.", |
617 | | - "properties": { |
618 | | - "uuid": { |
619 | | - "type": "string", |
620 | | - "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" |
621 | | - }, |
622 | | - "execute_condition": { "type": "string" } |
| 569 | + "type": "object", |
| 570 | + "patternProperties": { |
| 571 | + "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": { |
| 572 | + "type": "object", |
| 573 | + "required": [ |
| 574 | + "name", |
| 575 | + "safeName", |
| 576 | + "duration", |
| 577 | + "loopDelay", |
| 578 | + "loopMode", |
| 579 | + "frames", |
| 580 | + "includedNodes" |
| 581 | + ], |
| 582 | + "additionalProperties": false, |
| 583 | + "properties": { |
| 584 | + "name": { "type": "string" }, |
| 585 | + "safeName": { "type": "string" }, |
| 586 | + "duration": { "type": "number" }, |
| 587 | + "loopDelay": { "type": "number" }, |
| 588 | + "loopMode": { "type": "string", "enum": ["none", "loop", "ping-pong"] }, |
| 589 | + "includedNodes": { "type": "array", "items": { "type": "string" } }, |
| 590 | + "frames": { |
| 591 | + "type": "array", |
| 592 | + "items": { |
| 593 | + "type": "object", |
| 594 | + "required": ["time", "node_transforms"], |
| 595 | + "properties": { |
| 596 | + "time": { "type": "number" }, |
| 597 | + "node_transforms": { |
| 598 | + "type": "object", |
| 599 | + "patternProperties": { |
| 600 | + "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": { |
| 601 | + "$ref": "#/definitions/nodeTransform" |
| 602 | + } |
| 603 | + } |
| 604 | + }, |
| 605 | + "variant": { |
| 606 | + "type": "object", |
| 607 | + "description": "If included, this frame should change the variant of the model to the specified variant.", |
| 608 | + "properties": { |
| 609 | + "uuid": { |
| 610 | + "type": "string", |
| 611 | + "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" |
| 612 | + }, |
| 613 | + "execute_condition": { "type": "string" } |
| 614 | + } |
623 | 615 | } |
624 | 616 | } |
625 | 617 | } |
|
629 | 621 | } |
630 | 622 | }, |
631 | 623 | "dynamicAnimations": { |
632 | | - "type": "array", |
633 | | - "items": { |
634 | | - "type": "object", |
635 | | - "required": [ |
636 | | - "uuid", |
637 | | - "name", |
638 | | - "loop_mode", |
639 | | - "duration", |
640 | | - "excluded_nodes", |
641 | | - "animators" |
642 | | - ], |
643 | | - "additionalProperties": true, |
644 | | - "properties": { |
645 | | - "uuid": { "type": "string" }, |
646 | | - "name": { "type": "string" }, |
647 | | - "loop_mode": { "type": "string", "enum": ["loop", "once", "hold"] }, |
648 | | - "duration": { "type": "number" }, |
649 | | - "loop_delay": { "type": "number" }, |
650 | | - "excluded_nodes": { |
651 | | - "type": "array", |
652 | | - "items": { "type": "string" } |
653 | | - }, |
654 | | - "animators": { |
655 | | - "type": "object", |
656 | | - "patternProperties": { |
657 | | - "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": { |
658 | | - "type": "object", |
659 | | - "required": ["name", "type", "keyframes"], |
660 | | - "properties": { |
661 | | - "name": { "type": "string" }, |
662 | | - "type": { "type": "string" }, |
663 | | - "keyframes": { |
664 | | - "type": "array", |
665 | | - "items": { "$ref": "#/definitions/keyframe" } |
666 | | - } |
| 624 | + "type": "object", |
| 625 | + "patternProperties": { |
| 626 | + "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": { |
| 627 | + "type": "object", |
| 628 | + "required": ["name", "loop_mode", "duration", "excluded_nodes", "animators"], |
| 629 | + "additionalProperties": true, |
| 630 | + "properties": { |
| 631 | + "uuid": { "type": "string" }, |
| 632 | + "name": { "type": "string" }, |
| 633 | + "loop_mode": { "type": "string", "enum": ["loop", "once", "hold"] }, |
| 634 | + "duration": { "type": "number" }, |
| 635 | + "loop_delay": { "type": "number" }, |
| 636 | + "excluded_nodes": { |
| 637 | + "type": "array", |
| 638 | + "items": { "type": "string" } |
| 639 | + }, |
| 640 | + "animators": { |
| 641 | + "type": "object", |
| 642 | + "patternProperties": { |
| 643 | + "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": { |
| 644 | + "type": "array", |
| 645 | + "items": { "$ref": "#/definitions/keyframe" } |
667 | 646 | } |
668 | 647 | } |
669 | 648 | } |
|
732 | 711 | "keyframeDataPoint": { |
733 | 712 | "type": "object", |
734 | 713 | "properties": { |
735 | | - "x": { "oneOf": [{ "type": "number" }, { "type": "string" }] }, |
736 | | - "y": { "oneOf": [{ "type": "number" }, { "type": "string" }] }, |
737 | | - "z": { "oneOf": [{ "type": "number" }, { "type": "string" }] }, |
| 714 | + "x": { "type": "string" }, |
| 715 | + "y": { "type": "string" }, |
| 716 | + "z": { "type": "string" }, |
738 | 717 | "commands": { "type": "string" }, |
739 | 718 | "execute_condition": { "type": "string" }, |
740 | 719 | "repeat": { "type": "boolean" }, |
|
0 commit comments