diff options
Diffstat (limited to 'release/scripts/templates_py/custom_nodes.py')
-rw-r--r-- | release/scripts/templates_py/custom_nodes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/release/scripts/templates_py/custom_nodes.py b/release/scripts/templates_py/custom_nodes.py index 485ee0ebe05..3bcc7f979b3 100644 --- a/release/scripts/templates_py/custom_nodes.py +++ b/release/scripts/templates_py/custom_nodes.py @@ -37,8 +37,6 @@ class MyCustomSocket(bpy.types.NodeSocket): bl_idname = 'CustomSocketType' # Label for nice name display bl_label = 'Custom Node Socket' - # Socket color - bl_color = (1.0, 0.4, 0.216, 0.5) # Enum items list my_items = [ @@ -54,6 +52,9 @@ class MyCustomSocket(bpy.types.NodeSocket): def draw(self, context, layout, node): layout.prop(self, "myEnumProperty", text=self.name) + # Socket color + def draw_color(self, context, node): + return (1.0, 0.4, 0.216, 0.5) # Base class for all custom nodes in this tree type. # Defines a poll function to enable instantiation. |