paya.runtime.parts.PartBase#

class PartBase(groupNode)#

Inheritance

Trunk

Abstract base class for Part and PartGuide.

classmethod create()#

Stub constructor.

Returns

A fully configured empty part.

Return type

Part

classmethod createNode()#

Creates the basic transform (group) node for the part.

Returns

The initialised group node.

Return type

Transform

classmethod _getCreateNameContext()#

Called before a build wrapped by partCreator() to establish the naming environment.

Returns

A configured context manager.

Return type

Name

_postCreate()#

Called at the end of a build wrapped by partCreator().

The base implementation does the following:

  • Automatically configures visibility attributes for joints and controls first-level subgroups

getCreateArgsKwargs()#
Raises

NotImplementedError – Not implemented on this class.

Returns

The positional and keyword arguments required to recreate this part / guide with the same configuration.

Return type

(tuple, dict)

node()#
Returns

The wrapped transform (group) node.

Return type

Transform

basename()#
Returns

The short name of the group node, without the type suffix.

Return type

str

getControls()#
Returns

All transform nodes under the part group for which isControl() returns True.

Return type

[Transform]

getPartScale(plug=False)#
Parameters

plug/p (bool) – return a live output, not just a value

Returns

A scaling factor derived from the Y axis of the part group node’s world matrix.

Return type

Double

getPartScaleMatrix(plug=False)#
Parameters

plug/p (bool) – return a live output, not just a value

Returns

A scale matrix derived from the part group node.

Return type

Matrix

getPatchbay(create=True)#

Returns a general-utility network node connected to this part’s group node.

Parameters

create (bool) – create the network node if it doesn’t already exist; defaults to True

Returns

The network node.

Return type

Network

remove()#

Removes this part and all DG and DAG nodes that were created when it was first built.

__str__()#

Return str(self).