Updated the custom_nodes.py template script to reflect socket draw API changes in r56584 and r56585.
This commit is contained in:
@@ -49,8 +49,11 @@ class MyCustomSocket(bpy.types.NodeSocket):
|
|||||||
myEnumProperty = bpy.props.EnumProperty(name="Direction", description="Just an example", items=my_items, default='UP')
|
myEnumProperty = bpy.props.EnumProperty(name="Direction", description="Just an example", items=my_items, default='UP')
|
||||||
|
|
||||||
# Optional function for drawing the socket input value
|
# Optional function for drawing the socket input value
|
||||||
def draw(self, context, layout, node):
|
def draw(self, context, layout, node, text):
|
||||||
layout.prop(self, "myEnumProperty", text=self.name)
|
if self.is_linked:
|
||||||
|
layout.label(text)
|
||||||
|
else:
|
||||||
|
layout.prop(self, "myEnumProperty", text=text)
|
||||||
|
|
||||||
# Socket color
|
# Socket color
|
||||||
def draw_color(self, context, node):
|
def draw_color(self, context, node):
|
||||||
|
|||||||
Reference in New Issue
Block a user