pymel.core.datatypes.TransformationMatrix

digraph inheritance3e5fa9bc89 {
rankdir=TB;
ranksep=0.15;
nodesep=0.15;
size="8.0, 12.0";
  "TransformationMatrix" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="#pymel.core.datatypes.TransformationMatrix",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
  "Matrix" -> "TransformationMatrix" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "MTransformationMatrix" -> "TransformationMatrix" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "MMatrix" [shape=box,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=8,style="setlinewidth(0.5)",height=0.25];
  "MatrixN" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="../pymel.util.arrays/pymel.util.arrays.MatrixN.html#pymel.util.arrays.MatrixN",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
  "Array" -> "MatrixN" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "Matrix" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="pymel.core.datatypes.Matrix.html#pymel.core.datatypes.Matrix",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
  "MatrixN" -> "Matrix" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "MMatrix" -> "Matrix" [arrowsize=0.5,style="setlinewidth(0.5)"];
  "Array" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="../pymel.util.arrays/pymel.util.arrays.Array.html#pymel.util.arrays.Array",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
  "MTransformationMatrix" [shape=box,fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=8,style="setlinewidth(0.5)",height=0.25];
}

class TransformationMatrix(*args, **kwargs)
a00
a01
a02
a03
a10
a11
a12
a13
a20
a21
a22
a23
a30
a31
a32
a33
addRotation(rot, order, space)

Add to the rotation component by rotating relative to the existing transformation. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform . All other spaces are treated as being equivalent to MSpace::kTransform .

Parameters:

rot : (float, float, float)

order : TransformationMatrix.RotationOrder

values: ‘XYZ’, ‘YZX’, ‘ZXY’, ‘XZY’, ‘YXZ’, ‘ZYX’

space : Space.Space

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.addRotation

Undo is not currently supported for this method

addRotationQuaternion(x, y, z, w, space)

Add to the rotation component by rotating relative to the existing transformation. Rotation is a quaternion. The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kPreTransform . All other spaces are treated as being equivalent to MSpace::kTransform .

Parameters:

x : float

y : float

z : float

w : float

space : Space.Space

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.addRotationQuaternion

Undo is not currently supported for this method

addScale(scale, space)

Add to the scale component by scaling relative to the existing transformation.

Parameters:
scale : (float, float, float)

relative value to scale by

space : Space.Space

transform space in which to perform the scale

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.addScale

Undo is not currently supported for this method

addShear(shear, space)

Add to the shear component by shearing relative to the existing transformation.

Parameters:
shear : (float, float, float)

relative value to shear by

space : Space.Space

transform space in which to perform the shear

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.addShear

Undo is not currently supported for this method

addTranslation(vector, space)

Add to the translation component by translating relative to the existing transformation.

Parameters:
vector : Vector

relative value to translate by

space : Space.Space

transform space in which to perform the scale

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.addTranslation

Undo is not currently supported for this method

apicls
alias of MTransformationMatrix
asMatrixInverse()

Returns the inverse of the four by four matrix that describes this transformation.

Return type:Matrix

Derived from api method maya.OpenMaya.MTransformationMatrix.asMatrixInverse

asRotateMatrix()

Returns rotate space matrix. The rotate space matrix takes points from object space to the space immediately following the scale/shear/rotation transformations.

Return type:Matrix

Derived from api method maya.OpenMaya.MTransformationMatrix.asRotateMatrix

asScaleMatrix()

Returns scale space matrix. The scale space matrix takes points from object space to the space immediately following scale and shear transformations.

Return type:Matrix

Derived from api method maya.OpenMaya.MTransformationMatrix.asScaleMatrix

getRotatePivot(space)

Returns the pivot around which the rotation is applied.

Parameters:
space : Space.Space

space in which to get the pivot

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Point

Derived from api method maya.OpenMaya.MSpace.rotatePivot

getRotatePivotTranslation(space)

Returns the rotation pivot translation. This is the translation that is used to compensate for the movement of the rotation pivot.

Parameters:
space : Space.Space

space in which to get the pivot translation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Vector

Derived from api method maya.OpenMaya.MSpace.rotatePivotTranslation

getRotation()

Get the rotation component of the transformation matrix in angular units. The rotation is retrieved in MSpace::kTransform space.

Return type:((float, float, float), TransformationMatrix.RotationOrder)

Derived from api method maya.OpenMaya.MTransformationMatrix.getRotation

getRotationQuaternion()

Get the rotation component of the transformation matrix as a quaternion. The rotation is retrieved in MSpace::kTransform space.

Return type:(float, float, float, float)

Derived from api method maya.OpenMaya.MTransformationMatrix.getRotationQuaternion

getScale(space)

Get the scale component of the transformation matrix.

Parameters:
space : Space.Space

transform space in which to get the scale

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

(float, float, float)

Derived from api method maya.OpenMaya.MSpace.getScale

getScalePivot(space)

Returns the pivot around which the scale is applied.

Parameters:
space : Space.Space

space in which to get the pivot

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Point

Derived from api method maya.OpenMaya.MSpace.scalePivot

getScalePivotTranslation(space)

Returns the scale pivot translation. This is the translation that is used to compensate for the movement of the scale pivot.

Parameters:
space : Space.Space

space in which to get the pivot

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Vector

Derived from api method maya.OpenMaya.MSpace.scalePivotTranslation

getShear(space)

Get the shear component of the transformation matrix.

Parameters:
space : Space.Space

Transform space in which to get the shear.

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

(float, float, float)

Derived from api method maya.OpenMaya.MSpace.getShear

getTranslation(space)

Returns the translation component of the translation as a vector in linear units.

Parameters:
space : Space.Space

space in which to perform the translation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Return type:

Vector

Derived from api method maya.OpenMaya.MSpace.getTranslation

reorderRotation(order)

Reorders the x, y, and z components of the rotation of this transform. The overall rotation will remain the same. This operation is not unique, so spin information will be lost.

Parameters:
order : TransformationMatrix.RotationOrder

new order of the rotations

values: ‘XYZ’, ‘YZX’, ‘ZXY’, ‘XZY’, ‘YXZ’, ‘ZYX’

Derived from api method maya.OpenMaya.MTransformationMatrix.reorderRotation

Undo is not currently supported for this method

rotate
The rotation expressed in this TransformationMatrix, in transform space
rotation()
rotationOrder()

Returns the rotation order for the transform matrix. That is the order in which the Euler angles are applied to create the end rotation.

Return type:TransformationMatrix.RotationOrder

Derived from api method maya.OpenMaya.MTransformationMatrix.rotationOrder

scale
The scale expressed in this TransformationMatrix, in transform space
setRotatePivot(point, space, balance)

Set the pivot around which the rotation is applied.

Parameters:
point : Point

new rotation pivot

space : Space.Space

transform space in which to set the pivot

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

balance : bool

whether to balance the matrix

Derived from api method maya.OpenMaya.MSpace.setRotatePivot

setRotatePivotTranslation(vector, space)

Set the pivot translation. This component is used to preserve existing transformations when moving pivot. This method will only be useful to advanced users.

Parameters:
vector : Vector

new rotation pivot translation

space : Space.Space

transform space in which to set the rotation translation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setRotatePivotTranslation

setRotation(rot, order)

Set the rotation component of the transformation matrix. The rotation is set in MSpace::kTransform space.

Parameters:
rot : (float, float, float)

new rotation component in radians

order : TransformationMatrix.RotationOrder

order in which to apply rotations

values: ‘XYZ’, ‘YZX’, ‘ZXY’, ‘XZY’, ‘YXZ’, ‘ZYX’

Derived from api method maya.OpenMaya.MTransformationMatrix.setRotation

setRotationQuaternion(x, y, z, w)

Set the rotation component of the transformation matrix using a quaternion. The rotation is set in MSpace::kTransform space.

Parameters:
x : float

x component of new quaternion

y : float

y component of new quaternion

z : float

z component of new quaternion

w : float

w component of new quaternion

Derived from api method maya.OpenMaya.MTransformationMatrix.setRotationQuaternion

setScale(scale, space)

Set the scale component of the transformation matrix.

Parameters:
scale : (float, float, float)

new scale component

space : Space.Space

transform space in which to perform the scale

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setScale

setScalePivot(point, space, balance)

Set the pivot around which the scale is applied.

Parameters:
point : Point

new scale pivot

space : Space.Space

transform space in which to set the scale pivot

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

balance : bool

whether to balance the matrix

Derived from api method maya.OpenMaya.MSpace.setScalePivot

setScalePivotTranslation(vector, space)

Set the pivot translation. This component is used to preserve existing scale transformations when moving pivot. This method will only be useful to advanced users.

Parameters:
vector : Vector

new scale pivot translation

space : Space.Space

transform space in which to set the scale translation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setScalePivotTranslation

setShear(shear, space)

Set the shear component of the transformation matrix. The shear values represent (xy, xz, yx).

Parameters:
shear : (float, float, float)

new shear component

space : Space.Space

transform space in which to perform the shear

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setShear

setToRotationAxis(axis, rotation)

Sets the rotation given an axis and a rotation about it.

Parameters:
axis : Vector

axis to rotate about

rotation : float

rotation in radians

Derived from api method maya.OpenMaya.MTransformationMatrix.setToRotationAxis

Undo is not currently supported for this method

setTranslation(vector, space)

Set the translation component of the transformation matrix in linear units.

Parameters:
vector : Vector

new translation component in centimeters.

space : Space.Space

transform space in which to perform the translation

values: ‘transform’, ‘preTransform’, ‘object’, ‘world’

Derived from api method maya.OpenMaya.MSpace.setTranslation

translate
The translation expressed in this TransformationMatrix, in transform space

Previous topic

pymel.core.datatypes.Time

Next topic

pymel.core.datatypes.Unit

Core

Core Modules

Other Modules

This Page