From d3469d13cacd67d6eeea7b22f400a6f36f4bce8c Mon Sep 17 00:00:00 2001 From: jkukatzki <77100166+jkukatzki@users.noreply.github.com> Date: Tue, 21 May 2024 03:22:55 +0200 Subject: [PATCH] Update gltf2_blender_gather_nodes.py Fixed unchecked access to vnode.data.type variable. --- io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py index da0b8cf01..50a8de158 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py @@ -196,7 +196,7 @@ def __gather_extensions(vnode, export_settings): return None if export_settings["gltf_lights"] and vnode.blender_type == VExportNode.INSTANCE and vnode.data is not None: - if vnode.data.type in LIGHTS: + if hasattr(vnode.data, 'type') and vnode.data.type in LIGHTS: blender_lamp = vnode.data elif export_settings["gltf_lights"] and blender_object is not None and (blender_object.type == "LAMP" or blender_object.type == "LIGHT"): blender_lamp = blender_object.data