stf.instance.armature

[ Schema | Category: Instance ]

Represents an instance of an armature on a 3d node.

Implementations

Blender

bpy.types.Object with bpy.types.Armature

Godot

Skeleton3D

Unity

GameObject

Three.js

Object3D

Properties

type

required Constant: "stf.instance.armature"

armature

required Type: Resource-Ref

Must import into an armature.

pose

optional Type: object<Resource-ID, array<array<number>>>

The posed TRS (translation, rotation, scale) for bones (by Resource-ID) on the instantiated armature

Example:

{
	"385f56f2-7309-4a34-b992-ec7a915c937b": [
		[0, 0, 0],
		[0, 0, 0, 1],
		[1, 1, 1]
	],
	"385f56f2-7309-4a34-b992-ec7a915c937b": [
		[0.2134, 0, 1.23],
		[0.7, 0, 0, 0.7],
		[1.1, 1, 0.9]
	]
}

added_components

optional Type: object<Resource-ID, array<Resource-Ref>>

Components added to instantiated bones. (Bone-ID -> array)

Example:

{
	"385f56f2-7309-4a34-b992-ec7a915c937b": [1, 2],
	"69b80367-8d81-46d0-ae88-586d8dbb9b64": [3]
}

modified_components

optional Type: object<Resource-ID, object<Resource-ID, object>>

Modified values for existing components on the instantiated bones. (Bone-ID -> Component-ID -> Component-JSON)

Example:

{
	"1f2a58acd-b30a-4e8b-ba68-791423fb5f19": {
		"385f56f2-7309-4a34-b992-ec7a915c937b": {
			"weight": 0.345
		},
		"385f56f2-7309-4a34-b992-ec7a915c937b": {
			"weight": 0.667
		}
	},
	"06d3c6f6-45b0-4007-a464-ec8e5d45c72b": ...
}

Json Example:

{
    "type": "stf.instance.armature",
    "name": "",
    "referenced_resources": [
        "7ae076bd-d53f-478e-8b80-73bdaff97f2d",
        "82f72ec7-7ea3-4cdc-a970-6ed141ddef79",
        "e96b3ea1-99fc-4272-947d-635f594825bd"
    ],
    "armature": 0,
    "pose": {
        "b6f82f9a-b78f-4778-a513-32f4e2342ed0": [
            [
                0,
                0.6796078085899353,
                -0.01611711084842682
            ],
            [
                0,
                0,
                0,
                1
            ],
            [
                1,
                1,
                1
            ]
        ],
        "c0eac8b8-4644-40b0-a63a-e6366c70c0e4": [
            [
                0,
                0.10541439056396484,
                0
            ],
            [
                -0.03133900836110115,
                0,
                0,
                0.999508798122406
            ],
            [
                1,
                1,
                1
            ]
        ]
    },
    "added_components": {
        "b6f82f9a-b78f-4778-a513-32f4e2342ed0": [
            1,
            2
        ]
    },
    "modified_components": {
        "c0eac8b8-4644-40b0-a63a-e6366c70c0e4": {
            "ebde9045-5b00-44e8-8bcc-01ce02929234": {
                "radius": 0.066600002348423,
                "height": 1.2000000476837158,
                "offset_position": [
                    0,
                    0.029999999329447746,
                    0.0020000000949949026
                ],
                "offset_rotation": [
                    0.0523359477519989,
                    0,
                    0,
                    0.9986295104026794
                ]
            }
        }
    }
}