Shaders: add target setting to material output node.
This makes it possible to have a single shading nodetree that contains separate Cycles and Eevee shaders. By default the target is set to All so shaders are shared.
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
|
||||
__all__ = (
|
||||
"find_node_input",
|
||||
"find_output_node",
|
||||
)
|
||||
|
||||
|
||||
@@ -31,22 +30,3 @@ def find_node_input(node, name):
|
||||
return input
|
||||
|
||||
return None
|
||||
|
||||
# Return the output node to display in the UI. In case multiple node types are
|
||||
# specified, node types earlier in the list get priority.
|
||||
|
||||
|
||||
def find_output_node(ntree, nodetypes):
|
||||
if ntree:
|
||||
output_node = None
|
||||
for nodetype in nodetypes:
|
||||
for node in ntree.nodes:
|
||||
if getattr(node, "type", None) == nodetype:
|
||||
if getattr(node, "is_active_output", True):
|
||||
return node
|
||||
if not output_node:
|
||||
output_node = node
|
||||
if output_node:
|
||||
return output_node
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user