浏览代码

Merge pull request #61 from Jason0214/fix_animation_scale

fix animation scale
sdfgeoff 7 年之前
父节点
当前提交
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)

文件差异内容过多而无法显示
+ 0 - 0
tests/reference_exports/animation_bone_transform.escn


文件差异内容过多而无法显示
+ 1 - 1
tests/reference_exports/armature_with_non_deform_bone.escn


部分文件因为文件数量过多而无法显示