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:
Diffstat (limited to 'io_scene_gltf2/__init__.py')
-rwxr-xr-xio_scene_gltf2/__init__.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index e1bc6dff..4587fd9b 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (3, 2, 6),
+ "version": (3, 2, 7),
'blender': (3, 1, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
@@ -390,6 +390,15 @@ class ExportGLTF2_Base:
default=False
)
+ optimize_animation_size: BoolProperty(
+ name='Optimize Animation Size',
+ description=(
+ "Reduces exported filesize by removing duplicate keyframes"
+ "Can cause problems with stepped animation"
+ ),
+ default=True
+ )
+
export_current_frame: BoolProperty(
name='Use Current Frame',
description='Export the scene in the current animation frame',
@@ -582,11 +591,13 @@ class ExportGLTF2_Base:
else:
export_settings['gltf_def_bones'] = False
export_settings['gltf_nla_strips'] = self.export_nla_strips
+ export_settings['gltf_optimize_animation'] = self.optimize_animation_size
else:
export_settings['gltf_frame_range'] = False
export_settings['gltf_move_keyframes'] = False
export_settings['gltf_force_sampling'] = False
export_settings['gltf_def_bones'] = False
+ export_settings['gltf_optimize_animation'] = False
export_settings['gltf_skins'] = self.export_skins
if self.export_skins:
export_settings['gltf_all_vertex_influences'] = self.export_all_influences
@@ -874,6 +885,7 @@ class GLTF_PT_export_animation_export(bpy.types.Panel):
layout.prop(operator, 'export_frame_step')
layout.prop(operator, 'export_force_sampling')
layout.prop(operator, 'export_nla_strips')
+ layout.prop(operator, 'optimize_animation_size')
row = layout.row()
row.active = operator.export_force_sampling