User guide
163
<stringarray_parameter
name="preserveInheritedAttributes"
size="0" tupleSize="1"/>
<group_parameter name="preferredInputAttributes">
<stringarray_parameter name="name" size="0"
tupleSize="1"/>
<numberarray_parameter name="index" size="0"
tupleSize="1"/>
</group_parameter>
</group_parameter>
</group_parameter>
</node>
</node>
</katana>
Group Nodes
A Group node acts as a container for a sub-network of nodes. To add a Group node to a recipe under the root
location, then create a PrimitiveCreate node inside that group enter the following:
# Create a Group node at root, referenced as group
group = NodegraphAPI.CreateNode( 'Group', root )
Then, create a PrimitiveCreate, as in Creating a New Node but give the Group node as the level to create at, rather
than root as in the previous example:
groupChildNode = NodegraphAPI.CreateNode\
( 'PrimitiveCreate', group )
Alternatively, create a Group node and a PrimitiveCreate node at the root level, then parent the PrimitiveCreate node
under the Group node:
# Get the root node
root = NodegraphAPI.GetRootNode()
# Create the Group node at root level
group = NodegraphAPI.CreateNode( 'Group', root )
# Create the PrimitiveCreate node at root level
node = NodegraphAPI.CreateNode('PrimitiveCreate', root)
# Set the Group node as parent of the PrimitiveCreate node
node.setParent( group )
NOTE: Groups can be nested arbitrarily to form a Node Graph tree.
23 NODEGRAPH API | GROUP NODES