Browse Source

Merge pull request #61 from Jason0214/fix_animation_scale

fix animation scale
sdfgeoff 7 years ago
parent
commit
f584c6f5cd

+ 5 - 1
io_scene_godot/converters/animation.py

@@ -356,7 +356,11 @@ def export_transform_action(godot_node, animation_player,
             else:
                 rot_mat = self.rotation_euler.to_matrix().to_4x4()
             loc_mat = mathutils.Matrix.Translation(self.location)
-            sca_mat = mathutils.Matrix.Scale(1, 4, self.scale)
+            sca_mat = mathutils.Matrix((
+                (self.scale[0], 0, 0),
+                (0, self.scale[1], 0),
+                (0, 0, self.scale[2]),
+            )).to_4x4()
             return loc_mat * rot_mat * sca_mat
 
     first_frame, last_frame = get_action_frame_range(action)

File diff suppressed because it is too large
+ 0 - 0
tests/reference_exports/animation_bone_transform.escn


File diff suppressed because it is too large
+ 1 - 1
tests/reference_exports/armature_with_non_deform_bone.escn


Some files were not shown because too many files changed in this diff