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:
Lukas Toenne
2013-06-09 09:49:44 +00:00
parent 6e55460a8d
commit 3fe01ecfd9
2 changed files with 178 additions and 9 deletions

View File

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