diff options
author | Chris Foster <cdbfoster@gmail.com> | 2015-04-15 06:04:39 +0300 |
---|---|---|
committer | Chris Foster <cdbfoster@gmail.com> | 2015-04-15 06:04:39 +0300 |
commit | e66cdc9f40ef48fab506e801ec1e313db2487e0a (patch) | |
tree | d1739ab8d57ae3b7dc9c830c9cd23283ce4b9b65 | |
parent | 1bd2e362fc81fcd0194c07b6305e1a359e5a5cdb (diff) |
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.
-rw-r--r-- | io_scene_x/export_x.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/io_scene_x/export_x.py b/io_scene_x/export_x.py index fb17106e..345d14ab 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() |