diff options
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py index 20e7dbb6..8a4f011a 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py @@ -126,15 +126,12 @@ def get_bone_matrix(blender_object_if_armature: typing.Optional[bpy.types.Object data = {} - if bake_bone is None: - # Find the start and end of the whole action group - ranges = [channel.range() for channel in channels] + # Always using bake_range, because some bones may need to be baked, + # even if user didn't request it + + start_frame = bake_range_start + end_frame = bake_range_end - start_frame = min([channel.range()[0] for channel in channels]) - end_frame = max([channel.range()[1] for channel in channels]) - else: - start_frame = bake_range_start - end_frame = bake_range_end frame = start_frame while frame <= end_frame: |