diff --git a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py index cd55efd97..e1fb7642e 100644 --- a/addons/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py +++ b/addons/io_scene_gltf2/blender/exp/gltf2_blender_gltf2_exporter.py @@ -323,7 +323,8 @@ def __traverse_property(node): # I don't know why, but after reloading script, this condition failed # So using name comparison, instead of isinstance #if isinstance(node, gltf2_io_extensions.Extension): - if node and type(node).name == gltf2_io_extensions.Extension.name: + if isinstance(node, gltf2_io_extensions.Extension) \ + or (node and hasattr(type(node), "extension")): extension = self.__traverse(node.extension) self.__append_unique_and_get_index(self.__gltf.extensions_used, node.name) if node.required: diff --git a/addons/io_scene_gltf2/io/com/gltf2_io_extensions.py b/addons/io_scene_gltf2/io/com/gltf2_io_extensions.py index dd7f70548..46b25873a 100644 --- a/addons/io_scene_gltf2/io/com/gltf2_io_extensions.py +++ b/addons/io_scene_gltf2/io/com/gltf2_io_extensions.py @@ -17,6 +17,8 @@ class Extension: """Container for extensions. Allows to specify requiredness""" + extension = True + def __init__(self, name: str, extension: Dict[str, Any], required: bool = True): self.name = name self.extension = extension