Removed the unused draw_add_menu function from pynodes template. This was previously used to extend the node Add menu, now the node categories system is used instead.
This commit is contained in:
@@ -4,10 +4,6 @@ from bpy_types import NodeTree, Node, NodeSocket
|
||||
# Implementation of custom nodes from Python
|
||||
|
||||
|
||||
# Shortcut for node type menu
|
||||
def add_nodetype(layout, type):
|
||||
layout.operator("node.add_node", text=type.bl_label).type = type.bl_rna.identifier
|
||||
|
||||
# Derived from the NodeTree base type, similar to Menu, Operator, Panel, etc.
|
||||
class MyCustomTree(NodeTree):
|
||||
# Description string
|
||||
@@ -22,11 +18,6 @@ class MyCustomTree(NodeTree):
|
||||
# Only one base tree class is needed in the editor for selecting the general category
|
||||
bl_icon = 'NODETREE'
|
||||
|
||||
def draw_add_menu(self, context, layout):
|
||||
layout.label("Hello World!")
|
||||
add_nodetype(layout, bpy.types.CustomNodeType)
|
||||
add_nodetype(layout, bpy.types.MyCustomGroup)
|
||||
|
||||
|
||||
# Custom socket type
|
||||
class MyCustomSocket(NodeSocket):
|
||||
|
Reference in New Issue
Block a user