[Bf-extensions-cvs] [1ac8a720] blender2.8: Fix T58830 glTF exporter settings

Julien Duroure noreply at git.blender.org
Fri Dec 7 20:09:41 CET 2018


Commit: 1ac8a720609d92deba4d91d91a3a8b907a7ad6a8
Author: Julien Duroure
Date:   Fri Dec 7 20:07:33 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBA1ac8a720609d92deba4d91d91a3a8b907a7ad6a8

Fix T58830 glTF exporter settings

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

M	io_scene_gltf2/__init__.py

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

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index de2462be..b57c3bf4 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -274,7 +274,7 @@ class ExportGLTF2_Base:
                     setattr(self, k, v)
                 self.will_save_settings = True
 
-            except AttributeError:
+            except (AttributeError, TypeError):
                 self.report({"ERROR"}, "Loading export settings failed. Removed corrupted settings")
                 del context.scene[self.scene_key]
 
@@ -283,7 +283,7 @@ class ExportGLTF2_Base:
     def save_settings(self, context):
         # find all export_ props
         all_props = self.properties
-        export_props = {x: all_props.get(x) for x in dir(all_props)
+        export_props = {x: getattr(self, x) for x in dir(all_props)
                         if x.startswith("export_") and all_props.get(x) is not None}
 
         context.scene[self.scene_key] = export_props
@@ -521,3 +521,4 @@ def unregister():
     # remove from the export / import menu
     bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
     bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
+



More information about the Bf-extensions-cvs mailing list