alias_api.AlCluster
- class alias_api.AlCluster
Bases:
AlObjectEncapsulates creation, deletion and manipulation of clusters.
This class encapsulates the functionality for creating, manipulating and deleting a cluster. A cluster is a group of dag nodes and/or curve and surface control points, which are grouped as such for deformation purposes. Every cluster has a cluster dag node which is in the universe’s dag. Adding and removing nodes and control points to and from a cluster does not affect the topology of the universe’s dag. Transforming the cluster dag node affects the transformations of the objects in the cluster.
Empty clusters are allowed. An object can be in more than one cluster at a time, provided that those clusters are of type kMultiCluster. When an object is added to a cluster, it is given a weight that indicates how much of the cluster’s leaf transformation is applied to the object. The default weight is 100%. If a dag node is added to a cluster the percentages of each individual CV may be manipulated separately without actually adding the CVs themselves to the cluster.
To create a cluster, the user must instantiate and call create on an AlCluster object. This also creates an AlClusterNode which gets attached to the AlCluster and which is inserted into the universe’s dag. The user may not instantiate an AlClusterNode or an AlClusterMember directly.
There are two ways to delete a cluster object. When a cluster is deleted, its attached cluster node is deleted. Alternatively, when AlClusterNode.delete_object() is used, its cluster is deleted. The dag nodes and control points in a cluster are not deleted, however the AlClusterMember objects that represented the “in a cluster” relation are invalidated.
Clusters don’t have names. Any attempts to query for a name will return None.
- apply_iterator_to_members(self: alias_api.AlCluster, iterator: AlIterator, return_code: SupportsInt) int
Apply the given iterator to each member o this cluster.
- cluster_node(self: alias_api.AlCluster) AlClusterNode
Return a pointer to the attached (parent) cluster node. The cluster node must exist.
- copy_wrapper(self: alias_api.AlCluster) alias_api.AlObject
Return an exact duplicate of this AlCluster wrapper.
- create(self: alias_api.AlCluster) int
Create a cluster and a cluster dag node. The cluster dag node is automatically added to the current universe.
- delete_object(self: alias_api.AlCluster) int
Delete the AlCluster from the Alias Universe and return the status of the performed operation.
- is_empty(self: alias_api.AlCluster) int
Return True if this cluster is empty (does not have any memebrs).
- next_cluster(self: alias_api.AlCluster) alias_api.AlCluster
Return a pointer to the cluster following this onei n the global cluster list.
- number_of_members(self: alias_api.AlCluster) int
Return the number of members in this cluster.
- prev_cluster(self: alias_api.AlCluster) alias_api.AlCluster
Return a pointer to the cluster preceding this onei n the global cluster list.
- type(self: alias_api.AlCluster) alias_api.AlObjectType
Return the AlCluster type identifier.