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>2022-02-22 22:19:07 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-02-22 22:19:07 +0300
commitb2adbc6ba56d9e4380325866b8a3ae6d2d907a39 (patch)
tree41c70b1ff0221105d9e920f6801de2060cc6a72e /io_scene_gltf2/blender/exp
parentbb62f10715a871d7069d2b2c74b2efc97c3c350c (diff)
glTF exporter: optimized anims can now be disabled
Diffstat (limited to 'io_scene_gltf2/blender/exp')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_export_keys.py1
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_sampler_keyframes.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py b/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py
index 06fe6a47..ea7b4361 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_export_keys.py
@@ -57,6 +57,7 @@ EMBED_IMAGES = 'gltf_embed_images'
BINARY = 'gltf_binary'
EMBED_BUFFERS = 'gltf_embed_buffers'
USE_NO_COLOR = 'gltf_use_no_color'
+OPTIMIZE_ANIMS = 'gltf_optimize_animation'
METALLIC_ROUGHNESS_IMAGE = "metallic_roughness_image"
GROUP_INDEX = 'group_index'
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 caf14217..780460f6 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
@@ -318,6 +318,9 @@ def gather_keyframes(blender_object_if_armature: typing.Optional[bpy.types.Objec
keyframes.append(key)
+ if not export_settings[gltf2_blender_export_keys.OPTIMIZE_ANIMS]:
+ return keyframes
+
# For armature only
# Check if all values are the same
# In that case, if there is no real keyframe on this channel for this given bone,