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-03-13 13:39:29 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-03-13 13:39:29 +0300
commit4d8b2dc95f98493f44d51ace3712bf895686c670 (patch)
tree26e3d7c20bd95337165bda4c72c7120a3b492d79
parent8653db3808888a79bd83b92e33d314bbb9d873c2 (diff)
glTF exporter: remove back compatibility of export_selection -> use_selection
This is now more than a year old. Removing the back compatibility. Use can of course set again the value in UI at export
-rwxr-xr-xio_scene_gltf2/__init__.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index b87af39a..dcef27b1 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -4,7 +4,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, 13),
+ "version": (3, 2, 14),
'blender': (3, 1, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
@@ -287,13 +287,6 @@ class ExportGLTF2_Base:
default=False
)
- # keep it for compatibility (for now)
- export_selected: BoolProperty(
- name='Selected Objects',
- description='Export selected objects only',
- default=False
- )
-
use_selection: BoolProperty(
name='Selected Objects',
description='Export selected objects only',
@@ -462,11 +455,6 @@ 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():
setattr(self, k, v)
self.will_save_settings = True
@@ -503,8 +491,6 @@ 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):
@@ -554,18 +540,12 @@ class ExportGLTF2_Base:
export_settings['gltf_colors'] = self.export_colors
export_settings['gltf_cameras'] = self.export_cameras
- # compatibility after renaming export_selected to use_selection
- if self.export_selected is True:
- self.report({"WARNING"}, "export_selected is now renamed use_selection, and will be deleted in a few release")
- export_settings['gltf_selected'] = self.export_selected
- else:
- export_settings['gltf_selected'] = self.use_selection
export_settings['gltf_visible'] = self.use_visible
export_settings['gltf_renderable'] = self.use_renderable
export_settings['gltf_active_collection'] = self.use_active_collection
- # export_settings['gltf_selected'] = self.use_selection This can be uncomment when removing compatibility of export_selected
+ export_settings['gltf_selected'] = self.use_selection
export_settings['gltf_layers'] = True # self.export_layers
export_settings['gltf_extras'] = self.export_extras
export_settings['gltf_yup'] = self.export_yup