Small example for dynamic node labels in the custom_nodes.py template script.

This commit is contained in:
Lukas Toenne
2013-11-12 18:18:06 +00:00
parent 4d4ef0434b
commit 8db4f87546

View File

@@ -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