Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-06-09 12:46:47 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-06-09 12:46:47 +0400
commitfd2e3999bbbac2569e477eeb4eae1e261d1f4e36 (patch)
treed5c3df1db75eebc72e5fe4c160b587ad6f3c7bb1 /release
parent820acf1b9eee10e4efd6929b7ca05417611c5f1a (diff)
Removed the 'custom node group' example from the pynodes template script. This does not work properly due to the fact that node groups don't have a single registerable base class any more. The reason for
that is that RNA does not support multiple inheritance so the actual node group subtypes (ShaderNodeGroup, CompositorNodeGroup, TextureNodeGroup) can not be derived from both the ShaderNode/CompositorNode/TextureNode base types as well as a common NodeGroup type ... It is possible however to define node group types entirely in python which avoids the limitations of the RNA system and is much more flexible, example for this will follow later.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/templates_py/custom_nodes.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/release/scripts/templates_py/custom_nodes.py b/release/scripts/templates_py/custom_nodes.py
index a07d5173825..6d5f85a556c 100644
--- a/release/scripts/templates_py/custom_nodes.py
+++ b/release/scripts/templates_py/custom_nodes.py
@@ -120,44 +120,21 @@ class MyCustomNode(bpy.types.Node, MyCustomTreeNode):
layout.prop(self, "myStringProperty")
-# A customized group-like node.
-class MyCustomGroup(bpy.types.NodeGroup, MyCustomTreeNode):
- # === Basics ===
- # Description string
- '''A custom group node'''
- # Label for nice name display
- bl_label = 'Custom Group Node'
- bl_group_tree_idname = 'CustomTreeType'
- orks = bpy.props.IntProperty(default=3)
- dwarfs = bpy.props.IntProperty(default=12)
- wizards = bpy.props.IntProperty(default=1)
- # Additional buttons displayed on the node.
- def draw_buttons(self, context, layout):
- col = layout.column(align=True)
- col.prop(self, "orks")
- col.prop(self, "dwarfs")
- col.prop(self, "wizards")
-
- layout.label("The Node Tree:")
- layout.prop(self, "node_tree", text="")
def register():
bpy.utils.register_class(MyCustomTree)
bpy.utils.register_class(MyCustomSocket)
bpy.utils.register_class(MyCustomNode)
- bpy.utils.register_class(MyCustomGroup)
def unregister():
bpy.utils.unregister_class(MyCustomTree)
bpy.utils.unregister_class(MyCustomSocket)
bpy.utils.unregister_class(MyCustomNode)
- bpy.utils.unregister_class(MyCustomGroup)
if __name__ == "__main__":
register()
-