User guide
23
Creating New Flavors
To add a new flavor, enter the following in the Python tab:
NodegraphAPI.Flavor.AddNodeFlavor( 'nodeName', 'flavorName' )
For example, to add the node type Render to a flavor called myRenderFlavor, enter the following:
NodegraphAPI.Flavor.AddNodeFlavor( 'Render', 'myRenderFlavor' )
NOTE: If you want to completely customize node creation, you can also create a class derived from
NodegraphAPI.NodeDelegateManager.SuperDelegate with a function called processNodeCreate()
with one parameter that receives a newly created node:
class MySuperDelegate(NodegraphAPI.NodeDelegateManager.SuperDelegate):
def processNodeCreate(self, node):
print("Processing new node %s..." % node)
NodegraphAPI.NodeDelegateManager.RegisterSuperDelegate(MySuperDelegate())
Updating Node Colors
New rules and flavors, created and applied by entering them in the Python tab, are not retrospectively applied to
existing nodes in the Node Graph. To apply changes to existing nodes, choose the Color Nodes shelf item from the
main menu.
4 CUSTOM NODE COLORS |