Change to node output socket drawing: Instead of always drawing only the socket label for outputs, leave this check up to the socket type draw function. This gives custom node scripts more flexibility in

how to draw socket values by allowing buttons on output sockets as well.

http://wiki.blender.org/index.php/Extensions:2.6/Py/API_Changes#Python_Node_Output_Drawing
This commit is contained in:
Lukas Toenne
2013-10-10 12:58:35 +00:00
parent 2a54928563
commit 3b7d5a8a40
2 changed files with 9 additions and 15 deletions

View File

@@ -40,7 +40,7 @@ class MyCustomSocket(NodeSocket):
# Optional function for drawing the socket input value
def draw(self, context, layout, node, text):
if self.is_linked:
if self.is_output or self.is_linked:
layout.label(text)
else:
layout.prop(self, "myEnumProperty", text=text)