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
This commit is contained in:
parent
8653db3808
commit
4d8b2dc95f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue