diff options
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py index bf78dabd..f959ce14 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py @@ -48,7 +48,7 @@ def gather_animations(blender_object: bpy.types.Object, for blender_action, track_name in blender_actions: # Set action as active, to be able to bake if needed - if blender_object.animation_data: # Not for shapekeys! + if blender_action.id_root == "OBJECT" and blender_object.animation_data: # Not for shapekeys! if blender_object.animation_data.action is None \ or (blender_object.animation_data.action.name != blender_action.name): if blender_object.animation_data.is_property_readonly('action'): @@ -63,6 +63,8 @@ def gather_animations(blender_object: bpy.types.Object, print_console("WARNING", "Animation '{}' could not be exported. Cause: {}".format(blender_action.name, error)) continue + # No need to set active shapekeys animations, this is needed for bone baking + animation = __gather_animation(blender_action, blender_object, export_settings) if animation is not None: animations.append(animation) |