Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2018-11-25 18:26:12 +0300
committerJulien Duroure <julien.duroure@gmail.com>2018-11-25 18:26:12 +0300
commitf89d1c9581c03160485a7b4b09fa5d538331fdeb (patch)
tree62f9e2c261fb8be43ceb43bab519468ddf5b9aad /io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
parent8ac09109617d8acd81747bd3dffed915aa99c8cc (diff)
Fix orientation issue in object animation
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py')
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_animation_node.py6
1 files changed, 5 insertions, 1 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 2a04f469..9302afd5 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
@@ -55,7 +55,7 @@ class BlenderNodeAnim():
action = bpy.data.actions.new(name)
# Check if this action has some users.
# If no user (only 1 indeed), that means that this action must be deleted
- # (is an action from a deleted action)
+ # (is an action from a deleted object)
if action.users == 1:
bpy.data.actions.remove(action)
action = bpy.data.actions.new(name)
@@ -63,6 +63,10 @@ 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]