User guide
25 NodeTypeBuilder
NodeTypeBuilder is a Python class that makes it easy to define new 3D nodes that a user can
instantiate in their Katana project. It is the officially supported mechanism for creating nodes for any
custom Ops that you may write.
Introduction
from Katana import Nodes3DAPI
nodeBuilder = Nodes3DAPI.NodeTypeBuilder( “MyNodeType” )
The NodeTypeBuilder simplifies many of the tasks required to implement and manage the Ops represented by a
node, including:
• Registration of the node with the Katana node graph.
• Management of the ‘dirty state’ of the Ops, represented by the node, based on parameter changes.
• Retrieval of ‘system args’, such as shutter timings or GraphState variables.
• Management and validation of a node’s input ports.
For more details on the functions available, documentation is available in Python under:
help( Nodes3DAPI.NodeTypeBuilder )
help( Nodes3DAPI.NodeTypeBuilder.BuildChainInterface )
Creating a New Node
When working with the NodeTypeBuilder, you need to do two things:
1. Write a function that turns the current state of the node (and its parameters) into suitably configured Op
definitions (the buildOpChain function).
2. Write a function that feeds this into a NodeTypeBuilder, along with the parameter definitions for the node.
The buildOpChain Function in Detail
This function should build up a chain of Ops that can enact the functionality of the node. The idea is that whenever
the node has been dirtied, this function is called. The resulting Op chain it builds is automatically compared to the