瀏覽代碼

Fix constrain frame range issue

Jason0214 6 年之前
父節點
當前提交
f04edcb441

+ 1 - 2
io_scene_godot/converters/animation/constraint_baking.py

@@ -2,7 +2,6 @@
 
 
 import bpy
 import bpy
 import bpy_extras.anim_utils
 import bpy_extras.anim_utils
-from .action import get_action_frame_range
 
 
 # a suffix append to action need baking to avoid name collision
 # a suffix append to action need baking to avoid name collision
 # with baked action's name
 # with baked action's name
@@ -44,7 +43,7 @@ def bake_constraint_to_action(blender_object, base_action, bake_type,
     """Bake pose or object constrainst (e.g. IK) to action"""
     """Bake pose or object constrainst (e.g. IK) to action"""
     if base_action is not None:
     if base_action is not None:
         blender_object.animation_data.action = base_action
         blender_object.animation_data.action = base_action
-        frame_range = get_action_frame_range(base_action)
+        frame_range = tuple([int(x) for x in base_action.frame_range])
     else:
     else:
         frame_range = (1, 250)  # default, can be improved
         frame_range = (1, 250)  # default, can be improved
 
 

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


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


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