Group Parameters

Complex hierarchies of parameters are possible, by nesting parameters under group parameters. For example, to create a new PrimitiveCreate node, and add a number parameter nested under a group parameter:

# Get the root node
rootNode = NodegraphAPI.GetRootNode()

# Add a PrimitiveCreate node at root level
primNode = NodegraphAPI.CreateNode('PrimitiveCreate', rootNode)

# Get the PrimitiveCreate node's root parameter
rootParam = primNode.getParameters()

# Add a group parameter under the root parameter
groupParam = rootParam.createChildGroup("yourGroup")

# Add a number parameter under the group
numberParam = groupParam.createChildNumber("yourNumber", 123.00)
Parameter.createChildGroup(name, index=-1)

Create a new group parameter. Return new param.

Parameter.createChildNumber(name, value, index=-1)

Create a new number parameter. Return new param.

Parameter.createChildNumberArray(name, size, index=-1)

Create a new number array parameter. Return new param.

Parameter.createChildString(name, value, index=-1)

Create a new string parameter. Return new param.

Parameter.createChildStringArray(name, size, index=-1)

Create a new string array parameter. Return new param.

Parameter.createChildXmlIO(element, index=-1)

Create a new child parameter from any parameter XmlIO element. Return new param.


Delete a group child parameter from xml string.

Parameter.getChild(name) → Parameter

Get a child parameter by name. Returns None if not found.

Parameter.getChildByIndex(index) → Parameter

Get a child parameter by index. Returns None if out of range.

Parameter.getChildren() → list of Parameter

Return a new list of all the children parameters.

Parameter.getNumChildren() → int

Get the number of children parameters. Value is zero or greater.

Parameter.reorderChild(childParameter, index)

Move a child parameter.

Parameter.reorderChildren(oldIndex, newIndex, count)

Move the given number of child parameters from the given old index to the given new index.