Small example for dynamic node labels in the custom_nodes.py template script.
This commit is contained in:
@@ -109,6 +109,11 @@ class MyCustomNode(Node, MyCustomTreeNode):
|
||||
# myStringProperty button will only be visible in the sidebar
|
||||
layout.prop(self, "myStringProperty")
|
||||
|
||||
# Optional: custom label
|
||||
# Explicit user label overrides this, but here we can define a label dynamically
|
||||
def draw_label(self):
|
||||
return "I am a custom node"
|
||||
|
||||
|
||||
### Node Categories ###
|
||||
# Node categories are a python system for automatically
|
||||
|
Reference in New Issue
Block a user