diff options
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_gltf.py')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_gltf.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py index 3f55f933..637cd72f 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py @@ -202,6 +202,10 @@ class BlenderGlTF(): node.transform = mat + # Weight animation management + node.weight_animation = False + + # joint management for node_idx, node in enumerate(gltf.data.nodes): is_joint, skin_idx = gltf.is_node_joint(node_idx) @@ -229,9 +233,13 @@ class BlenderGlTF(): if anim_idx not in gltf.data.nodes[channel.target.node].animations.keys(): gltf.data.nodes[channel.target.node].animations[anim_idx] = [] gltf.data.nodes[channel.target.node].animations[anim_idx].append(channel_idx) + # Manage node with animation on weights, that are animated in meshes in Blender (ShapeKeys) + if channel.target.path == "weights": + gltf.data.nodes[channel.target.node].weight_animation = True # Meshes if gltf.data.meshes: for mesh in gltf.data.meshes: mesh.blender_name = None + mesh.is_weight_animated = False |