Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-09-18 01:35:40 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-09-18 01:35:40 +0300
commit812cb318c4e0d3f744777bef3744041b5f7c995f (patch)
treec921d2262aabdc63b72e62a6fd3d10b7876a25e6 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
parentcf2bb9e1256441c6148be79273da6f2116e63018 (diff)
glTF exporter: fix sample animation export when sampled is forced by context, not by user
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py13
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: