Skip to content
Snippets Groups Projects
Commit a3c82d4c authored by Lukas Toenne's avatar Lukas Toenne
Browse files

Updated the custom_nodes.py template script to reflect socket draw API changes...

Updated the custom_nodes.py template script to reflect socket draw API changes in r56584 and r56585.
parent 8deba334
No related branches found
No related tags found
No related merge requests found
......@@ -49,8 +49,11 @@ class MyCustomSocket(bpy.types.NodeSocket):
myEnumProperty = bpy.props.EnumProperty(name="Direction", description="Just an example", items=my_items, default='UP')
# Optional function for drawing the socket input value
def draw(self, context, layout, node):
layout.prop(self, "myEnumProperty", text=self.name)
def draw(self, context, layout, node, text):
if self.is_linked:
layout.label(text)
else:
layout.prop(self, "myEnumProperty", text=text)
# Socket color
def draw_color(self, context, node):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment