[Bf-extensions-cvs] [cd73cfa] master: Fixed some classes when all sockets are hidden
Bartek Skorupa
noreply at git.blender.org
Wed Sep 10 16:06:30 CEST 2014
Commit: cd73cfa9f2f6ee044a0a5555c2d9c4cde424fd92
Author: Bartek Skorupa
Date: Wed Sep 10 16:06:27 2014 +0200
Branches: master
https://developer.blender.org/rBAcd73cfa9f2f6ee044a0a5555c2d9c4cde424fd92
Fixed some classes when all sockets are hidden
In "Link to Output Node" and in "Emission Viewer" when all output
sockets are hidden - an error occurred. Now it's fixed.
===================================================================
M node_efficiency_tools.py
===================================================================
diff --git a/node_efficiency_tools.py b/node_efficiency_tools.py
index cd81b7e..375bff2 100644
--- a/node_efficiency_tools.py
+++ b/node_efficiency_tools.py
@@ -1391,7 +1391,10 @@ class NWEmissionViewer(Operator, NWBase):
valid = False
if active:
if (active.name != "Emission Viewer") and (active.type not in output_types) and not in_group:
- valid = True
+ for out in active.outputs:
+ if not out.hide:
+ valid = True
+ break
if valid:
# get material_output node, store selection, deselect all
materialout_exists = False
@@ -2651,7 +2654,10 @@ class NWLinkToOutputNode(Operator, NWBase):
valid = False
if nw_check(context):
if context.active_node is not None:
- valid = True
+ for out in context.active_node.outputs:
+ if not out.hide:
+ valid = True
+ break
return valid
def execute(self, context):
@@ -3039,8 +3045,6 @@ class NWConnectionListInputs(Menu, NWBase):
n2 = nodes[context.scene.NWLazyTarget]
- #print (self.from_socket)
-
index = 0
for i in n2.inputs:
op = layout.operator(NWMakeLink.bl_idname, text=i.name, icon="FORWARD")
More information about the Bf-extensions-cvs
mailing list