Skip to content

Commit

Permalink
Fix light node retrieval, after node group changes
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Oct 22, 2023
1 parent 9968a9f commit 5c1d21f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __gather_intensity(blender_lamp, export_settings) -> Optional[float]:
if blender_lamp.type != 'SUN':
# When using cycles, the strength should be influenced by a LightFalloff node
result = gltf2_blender_search_node_tree.from_socket(
emission_node.inputs.get("Strength"),
gltf2_blender_search_node_tree.NodeSocket(emission_node.inputs.get("Strength"), blender_lamp),
gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeLightFalloff)
)
if result:
Expand Down Expand Up @@ -141,7 +141,7 @@ def __get_cycles_emission_node(blender_lamp) -> Optional[bpy.types.ShaderNodeEmi
if not currentNode.is_active_output:
continue
result = gltf2_blender_search_node_tree.from_socket(
currentNode.inputs.get("Surface"),
gltf2_blender_search_node_tree.NodeSocket(currentNode.inputs.get("Surface"), blender_lamp),
gltf2_blender_search_node_tree.FilterByType(bpy.types.ShaderNodeEmission)
)
if not result:
Expand Down

0 comments on commit 5c1d21f

Please sign in to comment.