[Bf-extensions-cvs] [e66cdc9] master: Fix for exporting animation on armature bones that have keys for a rotation_mode other than 'QUATERNION'. Thanks to Dmitry (MakKlaski) for highlighting this issue.
Chris Foster
noreply at git.blender.org
Wed Apr 15 05:05:48 CEST 2015
Commit: e66cdc9f40ef48fab506e801ec1e313db2487e0a
Author: Chris Foster
Date: Tue Apr 14 23:04:39 2015 -0400
Branches: master
https://developer.blender.org/rBAe66cdc9f40ef48fab506e801ec1e313db2487e0a
Fix for exporting animation on armature bones that have keys for a rotation_mode other than 'QUATERNION'. Thanks to Dmitry (MakKlaski) for highlighting this issue.
===================================================================
M io_scene_x/export_x.py
===================================================================
diff --git a/io_scene_x/export_x.py b/io_scene_x/export_x.py
index fb17106..345d14a 100644
--- a/io_scene_x/export_x.py
+++ b/io_scene_x/export_x.py
@@ -1144,10 +1144,15 @@ class ArmatureAnimationGenerator(GenericAnimationGenerator):
for Bone, BoneAnimation in \
zip(ArmatureObject.pose.bones, BoneAnimations):
+ RotationMode = Bone.rotation_mode
+ Bone.rotation_mode = 'QUATERNION'
+
Rotation = ArmatureObject.data.bones[Bone.name] \
.matrix.to_quaternion() * \
Bone.rotation_quaternion
+ Bone.rotation_mode = RotationMode
+
PoseMatrix = Matrix()
if Bone.parent:
PoseMatrix = Bone.parent.matrix.inverted()
More information about the Bf-extensions-cvs
mailing list