[Bf-blender-cvs] [7487a4d] master: Fix T44763: Surface Panel does not update correctly according to Node Output for Cycles UI

Sergey Sharybin noreply at git.blender.org
Tue May 26 13:16:18 CEST 2015


Commit: 7487a4d4ac0e95f666e309b89898d3e9838a8ee6
Author: Sergey Sharybin
Date:   Tue May 26 16:15:01 2015 +0500
Branches: master
https://developer.blender.org/rB7487a4d4ac0e95f666e309b89898d3e9838a8ee6

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

===================================================================

M	intern/cycles/blender/addon/ui.py

===================================================================

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 430c0a9..7fa7139 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -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




More information about the Bf-blender-cvs mailing list