paya.runtime.nodes.Cluster#
- class Cluster(*args, **kwargs)#
Inheritance
Cluster
WeightGeometryFilter
WeightGeometryFilter
GeometryFilter
GeometryFilter
DependNode
DependNode
PyNode
ProxyUnicode
- classmethod create(*geos, geometry=None, handle=None, maintainOffset=None, conformShapeName=False, resetVisualOrigin=True, intermediateShape=None, worldMatrix=None, freeze=True, name=None, **mayaKwargs)#
Cluster constructor.
- Parameters
name/n (str) – a name for the cluster node; defaults to
None
*geos (None, str, tuple, list,
DeformableShape
,Transform
) – one or more geometries to bindgeometry/g (None, str, tuple, list,
DeformableShape
,Transform
) – alternative geometry aggregator; defaults to Nonehandle/hnd – a custom user handle (weighted node) for the cluster; if provided, will override the weightedNode / wn argument for
cluster()
; defaults to NonemaintainOffset/mo (bool) – prevent deformation jumps when assigning a custom handle that has transform values; if provided, will override the bindState / bs argument for
cluster()
; defaults to NoneconformShapeName/csn (bool) – when using a custom handle, rename the
ClusterHandle
node accordingly; defaults to TrueresetVisualOrigin/rvo (bool) – when using a custom handle, modify
origin
on theClusterHandle
node accordingly; defaults to TrueintermediateShape/i (bool) – sets the ‘intermediate’ state of the
ClusterHandle
node; where a custom weighted node is specified, this defaults to True if the destination parent has hero shapes, otherwise False; if no custom handle is specified, defaults to FalseworldMatrix/wm (None, list, tuple,
Matrix
) – ignored if a custom handle is specified; modifes the initial matrix of the default cluster handle; defaults to Nonefreeze/fr (bool) – ignored if worldMatrix was omitted, or if a custom handle was specified; after applying custom transformations to the default handle, freeze transform and scale but preserve rotation; defaults to True
**mayaKwargs – passed along to
cluster()
, except where overriden by other options
- Returns
The cluster node. To get the handle transform, use
getHandle()
.
- getHandle()#
Paya’s flavour of
getWeightedNode()
. Getter forhandle
property.- Returns
The cluster handle transform (weighted node).
- Return type
- setHandle(transform, maintainOffset=False, intermediateShape=None, resetVisualOrigin=True, deletePreviousHandle=False, conformShapeName=True)#
Swaps-in a custom handle transform (weighted node). Setter for
handle
property.- Parameters
transform (str,
Transform
) – the node to swap-inmaintainOffset/mo (bool) – prevent changes in deformation; defaults to False
intermediateShape/i (bool) – after reparenting the
ClusterHandle
node, set it to intermediate; defaults to True if the destination parent has hero shapes, otherwise FalseresetVisualOrigin/rvo (bool) – edit the
origin
attribute on theClusterHandle
so that it matches the new handle; defauls to TruedeletePreviousHandle/dph (bool) – delete the current weighted node after completing the swap
copyName/cn (bool) – copy the name of the current weighted node
conformShapeName/csn (bool) – after reparenting the
ClusterHandle
node, rename it to match the destination transform; defaults to True
- Returns
self
- Return type
- renameSystem(*name)#
Renames the cluster node, cluster handle shape and weighted node.
- Parameters
*name (str) – if omitted, defaults to contextual naming
- Returns
self
- Return type
Cluster
- getHandleShape()#
Getter for
handleShape
property.- Returns
The connected class:~paya.runtime.nodes.ClusterHandle node, if any.
- Return type
class:~paya.runtime.nodes.ClusterHandle