Fix T44763: Surface Panel does not update correctly according to Node Output for Cycles UI

This commit is contained in:
Sergey Sharybin
2015-05-26 16:15:01 +05:00
parent d20fd2da72
commit 7487a4d4ac

View File

@@ -733,9 +733,14 @@ def find_node(material, nodetype):
if material and material.node_tree:
ntree = material.node_tree
active_output_node = None
for node in ntree.nodes:
if getattr(node, "type", None) == nodetype:
return node
if getattr(node, "is_active_output", True):
return node
if not active_output_node:
active_output_node = node
return active_output_node
return None