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:
-rwxr-xr-xio_scene_gltf2/blender/imp/gltf2_blender_animation_node.py6
1 files changed, 6 insertions, 0 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 6a79ac67..0d36fb50 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
@@ -98,6 +98,12 @@ class BlenderNodeAnim():
else:
values = [quaternion_gltf_to_blender(vals) for vals in values]
+
+ # Manage antipodal quaternions
+ for i in range(1, len(values)):
+ if values[i].dot(values[i-1]) < 0:
+ values[i] = -values[i]
+
elif channel.target.path == "scale":
blender_path = "scale"
group_name = "scale"