diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2018-12-02 20:01:44 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2018-12-02 20:01:44 +0300 |
commit | bae40ff3bed8d9f1101d396ea2ec1643cc5b8af5 (patch) | |
tree | 38b5d5399be2817cc5166159bf848c40d1c4c4fd /io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py | |
parent | 6706c91ecf7dd759293b5a7e0b2b75e3c1d7c2e1 (diff) |
glTF: Fix object animation import
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py')
-rwxr-xr-x | io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py index 9302afd5..c053f84a 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py @@ -63,10 +63,6 @@ class BlenderNodeAnim(): obj.animation_data_create() obj.animation_data.action = bpy.data.actions[action.name] - # There is an animation on object - # We can't remove Yup2Zup oject - gltf.animation_object = True - for channel_idx in node.animations[anim_idx]: channel = animation.channels[channel_idx] @@ -75,6 +71,10 @@ class BlenderNodeAnim(): if channel.target.path in ['translation', 'rotation', 'scale']: + # There is an animation on object + # We can't remove Yup2Zup oject + gltf.animation_object = True + if channel.target.path == "translation": blender_path = "location" for idx, key in enumerate(keys): |