diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index de2462be5a1994a742dc384fa65859432aaa4ecc..b57c3bf46f82bbb0c174fe5e1115b89ec4821519 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) +