Plush

Transform#

plupy · Type index

Module: plupy · obtained from use.transform, use.world_transform, use.transform_2d, use.world_transform_2d, use.evaluated.transform

Write-through channel view; numeric vectors are immutable tuples. 3D rotation is XYZW quaternion.

3D writes normalize quaternions. 2D rotation reads normalize modulo one turn. Matrices use row-major storage and row vectors: world = local * parent. Matrix assignment is not supported. Dimension is selected by the accessor, never inferred from tuple length.

AccessorCoordinate spaceValue source
use.transformParent-local, 3DAuthored channels
use.world_transformWorld, 3DAuthored local pose under evaluated parent
use.transform_2dParent-local, 2DAuthored channels
use.world_transform_2dWorld, 2DAuthored local pose under evaluated parent
use.evaluated.transform / .transform_2dParent-localEvaluated; read only
use.evaluated.world_transform / .world_transform_2dWorldEvaluated; read only

World assignment converts back into stored local channels and preserves other channels. Reads inside plupy.edit include staged changes. Nested stored placements can be shared; their edits affect all uses of the owner. A wire can mask a written channel without being changed or disconnected. Use evaluated reads to find where the object currently appears.

PlupyError rejects nonfinite values, zero quaternions, singular parent conversions and writes that cannot be represented as translation/rotation/scale. World rotation/scale reads reject shear; world position and matrix reads preserve it. TRS reconstruction tolerance is 1e-4 * max(1, largest matrix element); stored channels use five-decimal rounding. Replaced-slot descendants without an unambiguous stored placement reject authored access. Writing an evaluated view raises TypeError.

class Transform

Usage and examples

Members: position · rotation · scale · matrix

position#

position   # read/write

3D: (x, y, z); 2D: (x, y).

rotation#

rotation   # read/write

3D: Quaternion (x, y, z, w); 2D: Angle in radians.

scale#

scale   # read/write

3D: (x, y, z); 2D: (x, y).

matrix#

matrix   # read-only

3D: 16-number tuple; 2D: 16-number tuple in XY plane.

PlupyError · Use · edit

Source#