فهرست منبع

Merge pull request #261 from Jason0214/fix_axis_angle

Support rotation mode 'AXIS_ANGLE'
Lu Jiacheng 6 سال پیش
والد
کامیت
2cd4cb1cda
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      io_scene_godot/converters/animation/serializer.py

+ 1 - 1
io_scene_godot/converters/animation/serializer.py

@@ -86,7 +86,7 @@ class TransformFrame:
         # FIXME: lose negative scale
         # FIXME: lose negative scale
         xform_frame.scale = xform_matrix.to_scale()
         xform_frame.scale = xform_matrix.to_scale()
 
 
-        if rotation_mode == 'QUATERNION':
+        if rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
             xform_frame.rotation_euler = xform_matrix.to_euler()
             xform_frame.rotation_euler = xform_matrix.to_euler()
         else:
         else:
             xform_frame.rotation_euler = xform_matrix.to_euler(rotation_mode)
             xform_frame.rotation_euler = xform_matrix.to_euler(rotation_mode)