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>2021-12-17 10:51:31 +0300
committerJulien Duroure <julien.duroure@gmail.com>2021-12-17 10:51:31 +0300
commit503570ad703268ef55cfa38beaa28ad15e3ecc57 (patch)
tree635c88b7f5d4eb3a2b749b1c2bf5bbc754eb605b /io_scene_gltf2
parentd737f2016dcc314ac562e0e7db4381a6281af19f (diff)
glTF exporter: Fix T93929 - back compatibility for use_selection
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-xio_scene_gltf2/__init__.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 069596fa..c7c44c7c 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": (1, 8, 2),
+ "version": (1, 8, 3),
'blender': (3, 0, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
@@ -461,14 +461,13 @@ class ExportGLTF2_Base:
self.will_save_settings = False
if settings:
try:
+ if 'export_selected' in settings.keys(): # Back compatibility for export_selected --> use_selection
+ setattr(self, "use_selection", settings['export_selected'])
+ settings["use_selection"] = settings['export_selected']
+ del settings['export_selected']
+ print("export_selected is now renamed use_selection, and will be deleted in a few release")
for (k, v) in settings.items():
- if k == "export_selected": # Back compatibility for export_selected --> use_selection
- setattr(self, "use_selection", v)
- del settings[k]
- settings["use_selection"] = v
- print("export_selected is now renamed use_selection, and will be deleted in a few release")
- else:
- setattr(self, k, v)
+ setattr(self, k, v)
self.will_save_settings = True
except (AttributeError, TypeError):
@@ -503,7 +502,8 @@ class ExportGLTF2_Base:
x: getattr(self, x) for x in dir(all_props)
if (x.startswith("export_") or x in exceptional) and all_props.get(x) is not None
}
-
+ if 'export_selected' in export_props.keys():
+ del export_props['export_selected'] # Do not save this property, only here for backward compatibility
context.scene[self.scene_key] = export_props
def execute(self, context):