[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57300] trunk/blender/release/scripts/ templates_py/custom_nodes.py: Removed the 'custom node group' example from the pynodes template script.

Lukas Toenne lukas.toenne at googlemail.com
Sun Jun 9 10:46:47 CEST 2013


Revision: 57300
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57300
Author:   lukastoenne
Date:     2013-06-09 08:46:47 +0000 (Sun, 09 Jun 2013)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/release/scripts/templates_py/custom_nodes.py

Modified: trunk/blender/release/scripts/templates_py/custom_nodes.py
===================================================================
--- trunk/blender/release/scripts/templates_py/custom_nodes.py	2013-06-08 21:58:00 UTC (rev 57299)
+++ trunk/blender/release/scripts/templates_py/custom_nodes.py	2013-06-09 08:46:47 UTC (rev 57300)
@@ -120,44 +120,21 @@
         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()
-




More information about the Bf-blender-cvs mailing list