diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-12-29 15:09:08 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-12-29 15:09:08 +0300 |
commit | 24cc252dc6f69edac3d811085253f7cbae690085 (patch) | |
tree | c10ed7b3379741672118c6fd6fbccf6e69110572 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py | |
parent | 60a11a0fc4426f01e87be0e019c5d909889e511e (diff) |
glTF exporter: animation get removed when using both TRS + SK animation
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) |