[Bf-extensions-cvs] [a35d66c1] master: glTF exporter: rename option to use_selection, like other exporter options

Julien Duroure noreply at git.blender.org
Sun Mar 15 07:50:11 CET 2020


Commit: a35d66c1337ae5e3f86f11a760ad24770386f9a9
Author: Julien Duroure
Date:   Sun Mar 15 07:49:40 2020 +0100
Branches: master
https://developer.blender.org/rBAa35d66c1337ae5e3f86f11a760ad24770386f9a9

glTF exporter: rename option to use_selection, like other exporter options

===================================================================

M	io_scene_gltf2/__init__.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index e60bf8b8..46a8ccda 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, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
-    "version": (1, 2, 42),
+    "version": (1, 2, 43),
     'blender': (2, 82, 7),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
@@ -222,7 +222,7 @@ class ExportGLTF2_Base:
         default=False
     )
 
-    use_selected: BoolProperty(
+    use_selection: BoolProperty(
         name='Selected Objects',
         description='Export selected objects only',
         default=False
@@ -352,11 +352,11 @@ class ExportGLTF2_Base:
         if settings:
             try:
                 for (k, v) in settings.items():
-                    if k == "export_selected": # Back compatibility for export_selected --> use_selected
-                        setattr(self, "use_selected", v)
+                    if k == "export_selected": # Back compatibility for export_selected --> use_selection
+                        setattr(self, "use_selection", v)
                         del settings[k]
-                        settings["use_selected"] = v
-                        print("export_selected is now renamed use_selected, and will be deleted in a few release")
+                        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)
                 self.will_save_settings = True
@@ -431,14 +431,14 @@ class ExportGLTF2_Base:
         export_settings['gltf_colors'] = self.export_colors
         export_settings['gltf_cameras'] = self.export_cameras
 
-        # compatibility after renaming export_selected to use_selected
+        # compatibility after renaming export_selected to use_selection
         if self.export_selected is True:
-            self.report({"WARNING"}, "export_selected is now renamed use_selected, and will be deleted in a few release")
+            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_selected
+            export_settings['gltf_selected'] = self.use_selection
 
-        # export_settings['gltf_selected'] = self.use_selected This can be uncomment when removing compatibility of export_selected
+        # export_settings['gltf_selected'] = self.use_selection This can be uncomment when removing compatibility of export_selected
         export_settings['gltf_layers'] = True  # self.export_layers
         export_settings['gltf_extras'] = self.export_extras
         export_settings['gltf_yup'] = self.export_yup
@@ -556,7 +556,7 @@ class GLTF_PT_export_include(bpy.types.Panel):
         sfile = context.space_data
         operator = sfile.active_operator
 
-        layout.prop(operator, 'use_selected')
+        layout.prop(operator, 'use_selection')
         layout.prop(operator, 'export_extras')
         layout.prop(operator, 'export_cameras')
         layout.prop(operator, 'export_lights')



More information about the Bf-extensions-cvs mailing list