OpenMaya.MTransformationMatrix

bnAddRotation Not implemented.
bnGetRotation Not implemented.
bnSetRotation Not implemented.
bnAddRotationQuaternion Not implemented.
bnGetRotationQuaternion Not implemented.
bnSetRotationQuaternion Not implemented.
bnAddScale Add to the scale component by scaling relatively.
bnGetScale Retrieve the scale component.
bnSetScale Set the scale component.
bnAddShear Add to the shear component by shearing relatively.
bnGetShear Retrieve the shear component.
bnSetShear Set the shear component.

MTransformationMatrix.bnAddRotation(rotation, order=maya.OpenMaya.MTransformationMatrix.kXYZ, space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> xform = transform.transformation()
>>> rotation = OpenMaya.MEulerRotation(1.0, 2.0, 3.0,
...                                    OpenMaya.MEulerRotation.kXYZ)
>>> xform.rotateBy(rotation, OpenMaya.MSpace.kTransform)
>>> transform.set(xform)

MTransformationMatrix.bnGetRotation(space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> rotation = transform.transformation().eulerRotation()
>>> [rotation.x, rotation.y, rotation.z]
[0.0, 0.0, 0.0]
>>> rotation.order
0

MTransformationMatrix.bnSetRotation(rotation, order=maya.OpenMaya.MTransformationMatrix.kXYZ, space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> xform = transform.transformation()
>>> rotation = OpenMaya.MEulerRotation(1.0, 2.0, 3.0,
...                                    OpenMaya.MEulerRotation.kXYZ)
>>> xform.rotateTo(rotation)
>>> transform.set(xform)

MTransformationMatrix.bnAddRotationQuaternion(rotation, space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> xform = transform.transformation()
>>> rotation = OpenMaya.MQuaternion(1.0, 2.0, 3.0, 4.0)
>>> xform.rotateBy(rotation, OpenMaya.MSpace.kTransform)
>>> transform.set(xform)

MTransformationMatrix.bnGetRotationQuaternion(space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> rotation = transform.transformation().rotation()
>>> [rotation.x, rotation.y, rotation.z, rotation.w]
[0.0, 0.0, 0.0, 1.0]

MTransformationMatrix.bnSetRotationQuaternion(rotation, order=maya.OpenMaya.MTransformationMatrix.kXYZ, space=maya.OpenMaya.MSpace.kTransform)[source]

Not implemented. See the examples for an alternative approach.

Categories: MScriptUtil.

Examples

Alternative approach:

>>> from maya import OpenMaya
>>> transform = OpenMaya.MFnTransform()
>>> transform.create()
>>> xform = transform.transformation()
>>> rotation = OpenMaya.MQuaternion(1.0, 2.0, 3.0, 4.0)
>>> xform.rotateTo(rotation)
>>> transform.set(xform)

MTransformationMatrix.bnAddScale(scale, space=maya.OpenMaya.MSpace.kTransform)[source]

Add to the scale component by scaling relatively.

Categories: MScriptUtil.

Parameters:
  • scale (sequence of 3 floats) – Relative value to scale by.
  • space (maya.OpenMaya.MSpace.Space) – Transform space in which to perform the scale.

MTransformationMatrix.bnGetScale(space=maya.OpenMaya.MSpace.kTransform)[source]

Retrieve the scale component.

Categories: MScriptUtil.

Parameters:space (maya.OpenMaya.MSpace.Space) – Transform space in which to get the scale.
Returns:The scale component.
Return type:list [x, y, z]

MTransformationMatrix.bnSetScale(scale, space=maya.OpenMaya.MSpace.kTransform)[source]

Set the scale component.

Categories: MScriptUtil.

Parameters:
  • scale (sequence of 3 floats) – New scale component.
  • space (maya.OpenMaya.MSpace.Space) – Transform space in which to set the scale.

MTransformationMatrix.bnAddShear(shear, space=maya.OpenMaya.MSpace.kTransform)[source]

Add to the shear component by shearing relatively.

Categories: MScriptUtil.

Parameters:
  • shear (sequence of 3 floats) – Relative value to shear by.
  • space (maya.OpenMaya.MSpace.Space) – Transform space in which to perform the shear.

MTransformationMatrix.bnGetShear(space=maya.OpenMaya.MSpace.kTransform)[source]

Retrieve the shear component.

Categories: MScriptUtil.

Parameters:space (maya.OpenMaya.MSpace.Space) – Transform space in which to get the shear.
Returns:The shear component.
Return type:list [x, y, z]

MTransformationMatrix.bnSetShear(shear, space=maya.OpenMaya.MSpace.kTransform)[source]

Set the shear component.

Categories: MScriptUtil.

Parameters:
  • shear (sequence of 3 floats) – New shear component.
  • space (maya.OpenMaya.MSpace.Space) – Transform space in which to set the shear.