Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed gltf export script crashing when selecting Include > Data > Punctual Lights in the export menu. #19

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion io_scene_gltf2/blender/exp/gltf2_blender_gather_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down