alias_api.AlGroupNode
- class alias_api.AlGroupNode
Bases:
AlDagNodeA dag node which can contain a list of dag nodes.
This class encapsulates the functionality for creating, manipulating and deleting a group node. A group node is a dag node which refers to a list of child dag nodes. It is this type of dag node which allows the hierarchical grouping of dag nodes.
The transformations which can be defined for a group node are inherited by each child dag node. This means that a group node’s transformations are combined with a child node’s transformations to define a global transformation for the object that the child node refers to.
A group node’s list of child dag nodes can be shared by more than one group node. If a group node’s list of child nodes is shared by another group node, both group nodes are considered “instanced”. This can be achieved by using the createInstance() method to create an instanced group node from another group node. The instanced group node is created as a sibling of the group node. There are methods for finding the next and previous instanced group node among its siblings and for determining whether a group node is an instanced node.
To create a group node, the user must call the constructor and then the create method for an AlGroupNode object. If a group node is not an instanced group node, deleting it will cause the deletion of all the child dag nodes and the deletion of any objects the child dag nodes refer to. Deleting an instanced group node will not cause all of its child nodes to be deleted since the list of child nodes is shared by another instanced group node.
Note on AlGroupNode.delete_object():
If a group node is an instanced group node, then only the group node is removed from its list of siblings and is deleted. The list of child dag nodes an instanced dag node refers to is not deleted. If this group node is not an instanced group node (i.e. none of its siblings share its list of child dag nodes), then the group node is removed from list of siblings it belongs to and the group node and every child node of the group node is deleted.
- add_child_node(self: alias_api.AlGroupNode, child_node: alias_api.AlDagNode) int
Adds an AlDagNode to the end of the list of child AlDagNodes. If the AlDagNode is already a child of this object, then nothing is done. Otherwise, the AlDagNode is removed from the list of siblings it belongs to and added to the end of this object’s list of children. If the AlDagNode is an AlGroupNode and it has siblings which are instanced AlGroupNodes, those instanced siblings are also made children of this object. It is illegal for the AlDagNode argument to be NULL or for it to not have had its create() method called.
- Parameters
child (AlDagNode) – the AlDagNode to be made a child of this object
- Returns
The status code result sSuccess - the argument is now a child of this object sInvalidArgument - ‘child’ was not valid sFailure - the AlDagNode could not be made a child of this object sInvalidObject - the groupnode was invalid
- Return type
int(AlStatusCode)
- add_children(self: alias_api.AlGroupNode, children: collections.abc.Sequence[alias_api.AlDagNode]) int
Adds an AlDagNode to the end of the list of child AlDagNodes. If the AlDagNode is already a child of this object, then nothing is done. Otherwise, the AlDagNode is removed from the list of siblings it belongs to and added to the end of this object’s list of children. If the AlDagNode is an AlGroupNode and it has siblings which are instanced AlGroupNodes, those instanced siblings are also made children of this object. It is illegal for the AlDagNode argument to be NULL or for it to not have had its create() method called.
- Parameters
children (List[AlDagNode]) – the children to add to this object.
- Returns
The status code result sSuccess - the argument is now a child of this object sInvalidArgument - ‘child’ was not valid sFailure - the AlDagNode could not be made a child of this object sInvalidObject - the groupnode was invalid
- Return type
int(AlStatusCode)
- apply_iterator_to_children(self: alias_api.AlGroupNode, arg0: AlIterator, arg1: SupportsInt) int
Apply the iterator to each of the children in this AlGroupNode.
- child_node(*args, **kwargs)
Overloaded function.
child_node(self: alias_api.AlGroupNode) -> alias_api.AlDagNode
Return the first AlDagNode in the list of child AlDagNodes.
child_node(self: alias_api.AlGroupNode, arg0: alias_api.AlTM) -> alias_api.AlDagNode
Return the first AlDagNode in the list of child AlDagNodes. The AlTM will be updated with the group node’s transform matrix.
- copy_wrapper(self: alias_api.AlGroupNode) alias_api.AlObject
Return an exact duplicate of this AlGroupNode wrapper.
- create(self: alias_api.AlGroupNode) int
Initialize the AlGroupNode in the Alias Universe.
- is_instance_node(self: alias_api.AlGroupNode) int
Return True if this object shares its list of children with another sibling AlGroupNode.
- is_instanceable(self: alias_api.AlGroupNode) int
Return False if this group node contains a non-instanceable dag node, else True.
- next_instance(self: alias_api.AlGroupNode) alias_api.AlGroupNode
Return a pointer to the object’s next sibling node in the list which is an instanced group node.
- prev_instance(self: alias_api.AlGroupNode) alias_api.AlGroupNode
Return a pointer to the object’s previous sibling node in the list which is an instanced group node.
- type(self: alias_api.AlGroupNode) alias_api.AlObjectType
Return the AlGroupNode type identifier.