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-08-07 08:02:50 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-08-07 08:02:50 +0300
commit72599842ab5bceaeec46623f382f3af2c3715d3b (patch)
tree470e2918f34255237fa1272177d741fb019a92d6 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py
parent26c53aa581b0faad7656e40dc83d157fa0bba93a (diff)
glTF exporter: add some checks on animation data, fixing error with weird files
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.py2
1 files changed, 2 insertions, 0 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 a24b2298..5d7763d0 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
@@ -181,6 +181,8 @@ def gather_keyframes(blender_object_if_armature: typing.Optional[bpy.types.Objec
else:
# Just use the keyframes as they are specified in blender
frames = [keyframe.co[0] for keyframe in channels[0].keyframe_points]
+ # some weird files have duplicate frame at same time, removed them
+ frames = sorted(set(frames))
for i, frame in enumerate(frames):
key = Keyframe(channels, frame, bake_channel)
# key.value = [c.keyframe_points[i].co[0] for c in action_group.channels]