diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2018-12-07 22:07:33 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2018-12-07 22:07:33 +0300 |
commit | 1ac8a720609d92deba4d91d91a3a8b907a7ad6a8 (patch) | |
tree | 53b97649ca239a8e89137c460951048c0ece6d79 /io_scene_gltf2/__init__.py | |
parent | 1a91a52ca4af9145fe488caf20dffeb9e614543a (diff) |
Fix T58830 glTF exporter settings
Diffstat (limited to 'io_scene_gltf2/__init__.py')
-rwxr-xr-x | io_scene_gltf2/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) + |