forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -166,18 +166,14 @@ def material_needs_sss(material: Material) -> bool:
|
||||
if sss_node is not None and sss_node.outputs[0].is_linked:
|
||||
return True
|
||||
|
||||
for sss_node in lnx.node_utils.iter_nodes_by_type(material.node_tree, 'BSDF_PRINCIPLED'):
|
||||
if sss_node is not None and sss_node.outputs[0].is_linked and (sss_node.inputs[1].is_linked or sss_node.inputs[1].default_value != 0.0):
|
||||
return True
|
||||
|
||||
for sss_node in mat_utils.iter_nodes_leenkxpbr(material.node_tree):
|
||||
if sss_node is not None and sss_node.outputs[0].is_linked and (sss_node.inputs[8].is_linked or sss_node.inputs[8].default_value != 0.0):
|
||||
return True
|
||||
|
||||
for principled_node in lnx.node_utils.iter_nodes_by_type(material.node_tree, 'BSDF_PRINCIPLED'):
|
||||
if principled_node is not None and principled_node.outputs[0].is_linked:
|
||||
sss_input = principled_node.inputs.get('Subsurface Weight') or principled_node.inputs.get('Subsurface')
|
||||
if sss_input is not None and (sss_input.is_linked or sss_input.default_value > 0.0):
|
||||
return True
|
||||
|
||||
for sss_node in mat_utils.iter_nodes_leenkxpbr(material.node_tree):
|
||||
if sss_node is not None and sss_node.outputs[0].is_linked and (sss_node.inputs[8].is_linked or sss_node.inputs[8].default_value != 0.0):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user