Skip to content

Commit

Permalink
Merge pull request #788 from KhronosGroup/fix_786
Browse files Browse the repository at this point in the history
Fix #786 crash trying to export area lights
  • Loading branch information
julienduroure authored Nov 23, 2019
2 parents e61fd69 + b1b51d1 commit f48ccb6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def __gather_node(blender_object, blender_scene, export_settings):
node.translation, node.rotation, node.scale = __gather_trans_rot_scale(blender_object, export_settings)

if export_settings[gltf2_blender_export_keys.YUP]:
if blender_object.type == 'LIGHT' and export_settings[gltf2_blender_export_keys.LIGHTS]:
# Checking node.extensions is making sure that the type of lamp is managed, and will be exported
if blender_object.type == 'LIGHT' and export_settings[gltf2_blender_export_keys.LIGHTS] and node.extensions:
correction_node = __get_correction_node(blender_object, export_settings)
correction_node.extensions = {"KHR_lights_punctual": node.extensions["KHR_lights_punctual"]}
del node.extensions["KHR_lights_punctual"]
Expand Down

0 comments on commit f48ccb6

Please sign in to comment.