diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-02-02 12:37:23 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-02-02 12:37:23 +0300 |
commit | 5675cda6a74a8e755a28afec25f479da7fbb4740 (patch) | |
tree | a546b005fca3d309e6f5334244f029ff2f371ec6 | |
parent | ad6928706de2fa8f44fa35a275453c716d65e773 (diff) | |
parent | 2efe738be140fe074b979c57aea2113e06d48c65 (diff) |
Merge branch 'blender-v2.82-release'
-rwxr-xr-x | io_scene_gltf2/__init__.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index a2777b0c..df6cda5e 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, 17), + "version": (1, 2, 18), 'blender': (2, 81, 6), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', @@ -465,11 +465,15 @@ class ExportGLTF2_Base: import sys preferences = bpy.context.preferences for addon_name in preferences.addons.keys(): - if hasattr(sys.modules[addon_name], 'glTF2ExportUserExtension'): - extension_ctor = sys.modules[addon_name].glTF2ExportUserExtension + try: + module = sys.modules[addon_name] + except Exception: + continue + if hasattr(module, 'glTF2ExportUserExtension'): + extension_ctor = module.glTF2ExportUserExtension user_extensions.append(extension_ctor()) - if hasattr(sys.modules[addon_name], 'glTF2ExportUserExtensions'): - extension_ctors = sys.modules[addon_name].glTF2ExportUserExtensions + if hasattr(module, 'glTF2ExportUserExtensions'): + extension_ctors = module.glTF2ExportUserExtensions for extension_ctor in extension_ctors: user_extensions.append(extension_ctor()) export_settings['gltf_user_extensions'] = user_extensions |