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: unicode, index: int = -1) → NodegraphAPI.Parameter

Creates and returns a new group parameter as a child of this group parameter. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.createChildNumber(name: unicode, value: float, index: int = -1) → NodegraphAPI.Parameter

Creates and returns a new number parameter with the given value as a child of this group parameter. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.createChildNumberArray(name: unicode, size: int, index: int = -1) → NodegraphAPI.Parameter

Creates and returns a new number array parameter of the given size as a child of this group parameter. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.createChildString(name: unicode, value: unicode, index: int = -1) → NodegraphAPI.Parameter

Creates and returns a new number parameter with the given value as a child of this group parameter. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.createChildStringArray(name: unicode, size: int, index: int = -1) → NodegraphAPI.Parameter

Creates and returns a new string array parameter of the given size as a child of this group parameter. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.createChildXmlIO(element: Geolib3::XmlIO::v1::Element, index: int = -1) → NodegraphAPI.Parameter

Creates a new child parameter from the given XmlIO.Element. If index is non-negative, the child will be created at that index; otherwise, it’ll be appended.

Parameter.deleteChild(child: NodegraphAPI.Parameter) → None

Deletes the given child from this group parameter.

Parameter.getChild(name: unicode) → NodegraphAPI.Parameter

Returns the group child by name, or None if not found.

Parameter.getChildByIndex(index: int) → NodegraphAPI.Parameter

Returns the group child at the given index, or None if index is out of range.

Parameter.getChildren() → list

Returns a list of all children of this group parameter.

Parameter.getNumChildren() → int_

Returns the number of children of this parameter if it is a group parameter, otherwise 0.

Parameter.reorderChild(child: NodegraphAPI.Parameter, index: int) → None

Moves child to the given index.

Parameter.reorderChildren(oldIndex: int, newIndex: int, count: int) → None

Moves count children starting at oldIndex to newIndex, retaining order. The source and destination ranges must not overlap.