Sfoglia il codice sorgente

Correct frame range passed to bake_action.

Fixes #138.

In blender 2.79, the arguments frame_start and frame_end are
treated as an _inclusive_ range, and the source of bake_action
adds 1 to frame_end.

See
https://developer.blender.org/diffusion/B/browse/blender-v2.79b-release/release/scripts/modules/bpy_extras/anim_utils.py$131

For the same behavior in blender 2.80, we need to increment frame_end
ourselves when constructing the range of frames to pass.
Ryan Roden-Corrent 6 anni fa
parent
commit
6d777600f0

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

@@ -89,7 +89,7 @@ def bake_constraint_to_action(blender_object, base_action, bake_type,
     else:
         baked_action = bpy_extras.anim_utils.bake_action(
             obj=blender_object,
-            frames=range(frame_range[0], frame_range[1]),
+            frames=range(frame_range[0], frame_range[1] + 1),
             only_selected=False,
             action=action_bake_into,
             do_pose=do_pose,