paya.runtime.nodes.Locator#

class Locator(*args, **kwargs)#

Inheritance

Locator GeometryShape GeometryShape Shape Shape DagNode DagNode Entity Entity ContainerBase ContainerBase DependNode DependNode PyNode ProxyUnicode

classmethod create(worldMatrix=None, displayLocalAxis=False, conformShapeName=None, name=None, parent=None, size=1.0)#

Locator constructor. Note that the return is the locator shape, not its transform.

Parameters
  • worldMatrix/wm – a world-matrix for the locator transform; ignored if a custom parent is specified via parent/p; defaults to None

  • displayLocalAxis/dla (bool) – display local rotation axes; defaults to None

  • conformShapeName/csn (bool) – ignored if parent was omitted; rename the shape after it is reparented; defaults to True if parent was provided, otherwise False

  • size/siz (float) – a convenience scalar for the locator localScale attribute; defaults to 1.0

  • parent/p (None, str, Transform) – a custom parent for the locator shape; defaults to None

  • name/n (str) – a name for the locator shape; defaults to None

Returns

The locator shape.

Return type

Locator

classmethod createFromMacro(macro, **overrides)#
Parameters
  • macro (dict) – the type of macro returned by macro()

  • **overrides – overrides to the macro, passed in as keyword arguments

Returns

The reconstructed locator shape.

Return type

Locator

macro(includeShapeDetails=False)#
Parameters

includeShapeDetails (bool) – include information on overrides; defaults to False

Returns

A simplified representation of this locator shape, used by createFromMacro() to reconstruct it.

Return type

dict

classmethod normalizeMacro(macro)#

Used by the shapes library to fit control points inside a unit cube. This is an in-place operation; the method has no return value.

Parameters

macro (dict) – the macro to edit