This reference page is linked to from the following overview topics: カスタム トランスフォームの概要.
Create and access transform nodes.
The MFnTransform function set provides access to transformation DAG nodes called transforms.
DAG nodes are separated into two types, transforms and geometry nodes. All DAG nodes that are not transform nodes must exist as a child of a transform node. Only transforms provide transformation information. Transforms are also commonly used as parent nodes for the purpose of hierarchical grouping.
The transformation in the node is represented as a 4x4 transformation matrix. This function set allows access to the whole matrix, or the individual components (eg scale, rotation, shear, etc) of the transformation. The transform node is made up of many components that make up the final transformation matrix. This breakdown provides animators fine control over the animation of these parameters. Therefore, it is necessary to describe the order in which these attributes are applied to build the final matrix attribute.
A transformation matrix is composed of the following components, all components with units will be in maya's internal units (radians for rotations and centimeters for translations):
The matrices are post-multiplied in Maya. For example, to transform a point P from object-space to world-space (P') you would need to post-multiply by the worldMatrix. (P' = P x WM)
The transformation matrix is then constructed as follows:
-1 -1 [Sp]x[S]x[Sh]x[Sp]x[St]x[Rp]x[Ro]x[R]x[Rp]x[Rt]x[T]
where 'x' denotes matrix multiplication and '-1' denotes matrix inversion
Sp = | 1 0 0 0 | St = | 1 0 0 0 | | 0 1 0 0 | | 0 1 0 0 | | 0 0 1 0 | | 0 0 1 0 | | spx spy spz 1 | | sptx spty sptz 1 | S = | sx 0 0 0 | Sh = | 1 0 0 0 | | 0 sy 0 0 | | shxy 1 0 0 | | 0 0 sz 0 | | shxz shyz 1 0 | | 0 0 0 1 | | 0 0 0 1 | Rp = | 1 0 0 0 | Rt = | 1 0 0 0 | | 0 1 0 0 | | 0 1 0 0 | | 0 0 1 0 | | 0 0 1 0 | | rpx rpy rpz 1 | | rptx rpty rptz 1 | Ro = AX * AY * AZ AX = | 1 0 0 0 | AY = | cy 0 -sy 0 | | 0 cx sx 0 | | 0 1 0 0 | | 0 -sx cx 0 | | sy 0 cy 0 | | 0 0 0 1 | | 0 0 0 1 | AZ = | cz sz 0 0 | sx = sin(rax), cx = cos(rax) | -sz cz 0 0 | sy = sin(ray), cx = cos(ray) | 0 0 1 0 | sz = sin(raz), cz = cos(raz) | 0 0 0 1 | R = RX * RY * RZ (Note: order is determined by rotateOrder) RX = | 1 0 0 0 | RY = | cy 0 -sy 0 | | 0 cx sx 0 | | 0 1 0 0 | | 0 -sx cx 0 | | sy 0 cy 0 | | 0 0 0 1 | | 0 0 0 1 | RZ = | cz sz 0 0 | sx = sin(rx), cx = cos(rx) | -sz cz 0 0 | sy = sin(ry), cx = cos(ry) | 0 0 1 0 | sz = sin(rz), cz = cos(rz) | 0 0 0 1 | T = | 1 0 0 0 | | 0 1 0 0 | | 0 0 1 0 | | tx ty tz 1 |
Note that internally the Maya transform does not store the individual component values in matrices. It stores them in the data structure which makes the most sense for that component. For example, translation is stored as a vector. The accessor methods on MFnTransform provide the data in their native structure rather than as a matrix.
Additionally, each transform can save a temporary "rest position" matrix using the setRestPosition method. The rest position is not used internally by Maya. It is exclusively for use from the API as a temporary cache, which can be set and restored within a single Maya session. Note that the rest position is not saved with the scene.
closestPointOnNurbsSurfaceCmd.cpp, customAttrManip.cpp, footPrintManip.cpp, geometrySurfaceConstraint.cpp, intersectOnNurbsSurfaceCmd.cpp, lepTranslator.cpp, lineManip.cpp, lineManipContainer.cpp, moveNumericTool.cpp, moveTool.cpp, simpleSolverNode.cpp, squareScaleManip.cpp, squareScaleManipContext.cpp, surfaceBumpManip.cpp, and swissArmyManip.cpp.
#include <MFnTransform.h>
Public Types |
|
enum | LimitType
{ kScaleMinX, kScaleMaxX, kScaleMinY, kScaleMaxY, kScaleMinZ, kScaleMaxZ, kShearMinXY, kShearMaxXY, kShearMinXZ, kShearMaxXZ, kShearMinYZ, kShearMaxYZ, kRotateMinX, kRotateMaxX, kRotateMinY, kRotateMaxY, kRotateMinZ, kRotateMaxZ, kTranslateMinX, kTranslateMaxX, kTranslateMinY, kTranslateMaxY, kTranslateMinZ, kTranslateMaxZ } |
Limit types. More... |
|
Public Member Functions |
|
virtual MFn::Type | type () const |
Function set type. |
|
virtual | ~MFnTransform () |
Destructor. |
|
MFnTransform () | |
Default constructor. |
|
MFnTransform (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MFnTransform (const MDagPath &object, MStatus *ret=NULL) | |
Constructor. |
|
MObject | create (MObject parent=MObject::kNullObj, MStatus *ReturnStatus=NULL) |
Creates a new transformation node. |
|
MTransformationMatrix | transformation (MStatus *ReturnStatus=NULL) const |
Retrieve the transformation matrix
represented by this transform. |
|
MStatus | set (const MTransformationMatrix &transform) |
Change this transform to equal the given
matrix. |
|
MStatus | getScale (double scale[3]) const |
Retrieve the scaling component of this
transformation. |
|
MStatus | setScale (const double scale[3]) |
Set the scaling component of this
transformation. |
|
MStatus | scaleBy (const double scale[3]) |
Relatively scale this transformation.
|
|
MStatus | getShear (double scale[3]) const |
Retrieve the shearing component of this
transformation. |
|
MStatus | setShear (const double shear[3]) |
Set the shearing component of this
transformation. |
|
MStatus | shearBy (const double shear[3]) |
Relatively shear this transformation.
|
|
MStatus | getRotation (MQuaternion &quaternion, MSpace::Space=MSpace::kTransform) const |
Retrieve the rotation component of this
transformation as a quaternion. |
|
MStatus | setRotation (const MQuaternion &quaternion, MSpace::Space=MSpace::kTransform) |
Change the rotation component of this
transformation using a quaternion. |
|
MStatus | rotateBy (const MQuaternion &quaternion, MSpace::Space=MSpace::kTransform) |
Relatively change the rotation of this
transformation using a quaternion. |
|
MStatus | getRotation (MEulerRotation &rotation) const |
Retrieve the rotation component of this
transformation. |
|
MStatus | setRotation (const MEulerRotation &rotation) |
Change the rotation component of this
transformation. |
|
MStatus | rotateBy (const MEulerRotation &rotation, MSpace::Space=MSpace::kTransform) |
Relatively change the rotation component of
this transformation. |
|
MStatus | getRotationQuaternion (double &x, double &y, double &z, double &w, MSpace::Space=MSpace::kTransform) const |
Retrieve the rotation component of this
transformation as a quaternion. |
|
MStatus | setRotationQuaternion (double x, double y, double z, double w, MSpace::Space=MSpace::kTransform) |
Change the rotation component of this
transformation using a quaternion. |
|
MStatus | rotateByQuaternion (double x, double y, double z, double w, MSpace::Space=MSpace::kTransform) |
Relatively change the rotation of this
transformation using a quaternion. |
|
MStatus | getRotation (double rotation[3], MTransformationMatrix::RotationOrder &order) const |
Retrieve the rotation component of this
transformation. |
|
MStatus | setRotation (const double rotation[3], MTransformationMatrix::RotationOrder order) |
Change the rotation component of this
transformation. |
|
MStatus | rotateBy (const double rotation[3], MTransformationMatrix::RotationOrder order, MSpace::Space=MSpace::kTransform) |
Relatively change the rotation component of
this transformation. |
|
MVector | getTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Retrieve the translation component of this
transformation in centimeters. |
|
MStatus | setTranslation (const MVector &vec, MSpace::Space space) |
Change the translation component of this
transformation. |
|
MStatus | translateBy (const MVector &vec, MSpace::Space space) |
Relatively change the translation component
of this transformation. |
|
MPoint | scalePivot (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Returns the pivot around which the scale is
applied. |
|
MStatus | setScalePivot (const MPoint &point, MSpace::Space space, bool balance) |
Set the pivot around which the scale is
applied in centimeters. |
|
MVector | scalePivotTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Returns the scale pivot translation in
centimeters. |
|
MStatus | setScalePivotTranslation (const MVector &vec, MSpace::Space space) |
Set the scale pivot translation in
centimeters. |
|
MPoint | rotatePivot (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Returns the pivot about which the rotation
is applied. |
|
MStatus | setRotatePivot (const MPoint &point, MSpace::Space space, bool balance) |
Set the rotate pivot in centimeters about
which rotation is applied. |
|
MVector | rotatePivotTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Return the rotate pivot translation in
centimeters. |
|
MStatus | setRotatePivotTranslation (const MVector &vec, MSpace::Space space) |
Set the rotate pivot translation in
centimeters. |
|
MQuaternion | rotateOrientation (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
Returns the rotation used to orient the
local rotation space. |
|
MStatus | setRotateOrientation (const MQuaternion &quat, MSpace::Space space, bool balance) |
Set the rotation used to orient the local
rotation space. |
|
MTransformationMatrix::RotationOrder | rotationOrder (MStatus *ReturnStatus=NULL) const |
Returns the rotation order for the transform
matrix - the order in which the Euler angles are applied to create
the end rotation. |
|
MStatus | setRotationOrder (MTransformationMatrix::RotationOrder order, bool reorder) |
Change the rotation order for the transform
- the order in which the Euler angles are applied to create the end
rotation. |
|
MTransformationMatrix | restPosition (MStatus *ReturnStatus) const |
Retrieve the saved rest position of this
transform. |
|
MStatus | setRestPosition (const MTransformationMatrix &matrix) |
Change the saved rest position of this
transform. |
|
MStatus | resetFromRestPosition () |
Reset the transform to its rest position.
|
|
MStatus | clearRestPosition () |
Clear the saved rest position of this
transform. |
|
MStatus | getRotation (double rotation[3], MTransformationMatrix::RotationOrder &order, MSpace::Space) const |
This method is obsolete. |
|
MStatus | setRotation (const double rotation[3], MTransformationMatrix::RotationOrder order, MSpace::Space) |
This method is obsolete. |
|
MVector | translation (MSpace::Space space, MStatus *ReturnStatus=NULL) const |
This method is obsolete. |
|
bool | isLimited (MFnTransform::LimitType type, MStatus *ReturnStatus=NULL) const |
Determine if the specified limit attribute
is enabled or disabled. |
|
double | limitValue (MFnTransform::LimitType type, MStatus *ReturnStatus=NULL) const |
Determine the current value of the specified
limit. |
|
MStatus | setLimit (MFnTransform::LimitType type, double value) |
Change the limit value for the specified
limit type, and automatically enable the limit to be true. |
|
MStatus | enableLimit (MFnTransform::LimitType type, bool flag) |
Enable or disable the limit value for the
specified limit type. |
|
MFnTransform (const MObject &object, MStatus *ret=NULL) | |
Constructor. |
|
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
enum LimitType |
Limit types.
~MFnTransform | ( | ) | [virtual] |
Destructor.
Class Destructor.
MFnTransform | ( | MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFnTransform | ( | const MDagPath & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
[in] | object | The const MDagPath to attach the function set to |
[out] | ReturnStatus | The return status |
MFnTransform | ( | const MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kTransform.
Reimplemented from MFnDagNode.
Reimplemented in MFnCircleSweepManip, MFnCurveSegmentManip, MFnDirectionManip, MFnDiscManip, MFnDistanceManip, MFnFreePointTriadManip, MFnHikEffector, MFnIkEffector, MFnIkHandle, MFnIkJoint, MFnManip3D, MFnPointOnCurveManip, MFnPointOnSurfaceManip, MFnRotateManip, MFnScaleManip, MFnStateManip, and MFnToggleManip.
const char * className | ( | ) | const [protected, virtual] |
Class name.
Return the class name : "MFnTransform".
Reimplemented from MFnDagNode.
Reimplemented in MFnCircleSweepManip, MFnCurveSegmentManip, MFnDirectionManip, MFnDiscManip, MFnDistanceManip, MFnFreePointTriadManip, MFnHikEffector, MFnIkEffector, MFnIkHandle, MFnIkJoint, MFnManip3D, MFnPointOnCurveManip, MFnPointOnSurfaceManip, MFnRotateManip, MFnScaleManip, MFnStateManip, and MFnToggleManip.
MObject create | ( | MObject | parent = MObject::kNullObj , |
MStatus * | ReturnStatus =
NULL |
||
) |
Creates a new transformation node.
The new node is placed in the DAG.
[in] | parent | the parent of the transform to be created |
[out] | ReturnStatus | status code |
Reimplemented in MFnHikEffector, MFnIkEffector, and MFnIkJoint.
MTransformationMatrix transformation | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Retrieve the transformation matrix represented by this transform.
[out] | ReturnStatus | status code |
MStatus set | ( | const MTransformationMatrix & | transform | ) |
Change this transform to equal the given matrix.
[in] | transform | the matrix to copy |
MStatus getScale | ( | double | scale[3] | ) | const |
Retrieve the scaling component of this transformation.
[out] | scale | Storage for the scale of the transform |
MStatus setScale | ( | const double | scale[3] | ) |
Set the scaling component of this transformation.
[in] | scale | The scale of the transform |
MStatus scaleBy | ( | const double | scale[3] | ) |
Relatively scale this transformation.
[in] | scale | The ratio by which to scale the transform |
MStatus getShear | ( | double | shear[3] | ) | const |
Retrieve the shearing component of this transformation.
[out] | shear | Storage for the shear of the transform |
MStatus setShear | ( | const double | shear[3] | ) |
Set the shearing component of this transformation.
[in] | shear | The shear of the transform |
MStatus shearBy | ( | const double | shear[3] | ) |
Relatively shear this transformation.
[in] | shear | The ratio by which to shear the transform |
MStatus getRotation | ( | MQuaternion & | quaternion, |
MSpace::Space | space =
MSpace::kTransform |
||
) | const |
Retrieve the rotation component of this transformation as a quaternion.
The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kWorld. All other spaces are treated as being equivalent to MSpace::kTransform.
[out] | quaternion | the quaternion |
[in] | space | transform space in which to get the rotation |
MStatus setRotation | ( | const MQuaternion & | quaternion, |
MSpace::Space | space =
MSpace::kTransform |
||
) |
Change the rotation component of this transformation using a quaternion.
The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kWorld. All other spaces are treated as being equivalent to MSpace::kTransform.
[in] | quaternion | the quaternion |
[in] | space | transform space in which to perform the rotation |
MStatus rotateBy | ( | const MQuaternion & | quaternion, |
MSpace::Space | space =
MSpace::kTransform |
||
) |
Relatively change the rotation of this transformation using a quaternion.
[in] | quaternion | the quaternion |
[in] | space | transform space in which to perform the rotation |
MStatus getRotation | ( | MEulerRotation & | rotation | ) | const |
Retrieve the rotation component of this transformation.
The rotation is retrieved in MSpace::kTransform space.
[out] | rotation | the euler rotation in radians |
MStatus setRotation | ( | const MEulerRotation & | rotation | ) |
Change the rotation component of this transformation.
The rotation is set in MSpace::kTransform space.
[in] | rotation | the euler rotation |
MStatus rotateBy | ( | const MEulerRotation & | rotation, |
MSpace::Space | space =
MSpace::kTransform |
||
) |
Relatively change the rotation component of this transformation.
[in] | rotation | the euler rotation |
[in] | space | transform space in which to perform the rotation |
MStatus getRotationQuaternion | ( | double & | x, |
double & | y, | ||
double & | z, | ||
double & | w, | ||
MSpace::Space | space =
MSpace::kTransform |
||
) | const |
Retrieve the rotation component of this transformation as a quaternion.
The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kWorld. All other spaces are treated as being equivalent to MSpace::kTransform.
[out] | x | storage for the x component of the quaternion |
[out] | y | storage for the y component of the quaternion |
[out] | z | storage for the z component of the quaternion |
[out] | w | storage for the w component of the quaternion |
[in] | space | transform space in which to get the rotation |
MStatus setRotationQuaternion | ( | double | x, |
double | y, | ||
double | z, | ||
double | w, | ||
MSpace::Space | space =
MSpace::kTransform |
||
) |
Change the rotation component of this transformation using a quaternion.
The only valid transformation spaces for this method are MSpace::kTransform and MSpace::kWorld. All other spaces are treated as being equivalent to MSpace::kTransform.
[in] | x | x component of the quaternion |
[in] | y | y component of the quaternion |
[in] | z | z component of the quaternion |
[in] | w | w component of the quaternion |
[in] | space | transform space in which to perform the rotation |
MStatus rotateByQuaternion | ( | double | x, |
double | y, | ||
double | z, | ||
double | w, | ||
MSpace::Space | space =
MSpace::kTransform |
||
) |
Relatively change the rotation of this transformation using a quaternion.
[in] | x | x component of the quaternion |
[in] | y | y component of the quaternion |
[in] | z | z component of the quaternion |
[in] | w | w component of the quaternion |
[in] | space | transform space in which to perform the rotation |
MStatus getRotation | ( | double | rotation[3], |
MTransformationMatrix::RotationOrder & | order | ||
) | const |
Retrieve the rotation component of this transformation.
The rotation is retrieved in MSpace::kTransform space.
[out] | rotation | storage for the rotation components |
[out] | order | storage for the order of rotation |
MStatus setRotation | ( | const double | rotation[3], |
MTransformationMatrix::RotationOrder | order | ||
) |
Change the rotation component of this transformation.
The rotation is set in MSpace::kTransform space.
[in] | rotation | the new rotation components |
[in] | order | the order in which to apply the rotations |
MStatus rotateBy | ( | const double | rotation[3], |
MTransformationMatrix::RotationOrder | order, | ||
MSpace::Space | space =
MSpace::kTransform |
||
) |
Relatively change the rotation component of this transformation.
[in] | rotation | the relative rotation components |
[in] | order | the order in which to apply the rotations |
[in] | space | transform space in which to perform the rotation |
MVector getTranslation | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Retrieve the translation component of this transformation in centimeters.
[in] | space | transform space in which to get the translation |
[out] | ReturnStatus | return status |
MStatus setTranslation | ( | const MVector & | vector, |
MSpace::Space | space | ||
) |
Change the translation component of this transformation.
[in] | vector | the new translation vector in centimeters |
[in] | space | transform space in which to perform the translation |
MStatus translateBy | ( | const MVector & | vector, |
MSpace::Space | space | ||
) |
Relatively change the translation component of this transformation.
[in] | vector | the relative translation vector |
[in] | space | transform space in which to perform the translation |
MPoint scalePivot | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the pivot around which the scale is applied.
The pivot will be in centimeters.
[in] | space | space in which to get the pivot |
[out] | ReturnStatus | return status |
MStatus setScalePivot | ( | const MPoint & | point, |
MSpace::Space | space, | ||
bool | balance | ||
) |
Set the pivot around which the scale is applied in centimeters.
If balance if true, then the overall transformation matrix will not change and a compensating transformation will be added to the scale pivot translation to to compensate for the new scale pivot.
[in] | point | new scale pivot in centimeters |
[in] | space | transform space in which to set the scale pivot |
[in] | balance | whether to balance the matrix |
MVector scalePivotTranslation | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the scale pivot translation in centimeters.
This component is used as a compensation by maya when the user moves the scale pivot, or when the balance flag is set to true in the MfnTransform::setScalePivot method. The scale pivot translation serves as a compensation that allows existing transformations to be preserved when the scale pivot is modified. For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
[in] | space | space in which to get the scale pivot translation |
[out] | ReturnStatus | return status |
MStatus setScalePivotTranslation | ( | const MVector & | vector, |
MSpace::Space | space | ||
) |
Set the scale pivot translation in centimeters.
This component is used internally by maya when the user moves the scale pivot, or when the balance flag is set to true in the MfnTransform::setScalePivot method. It serves as a compensation that allows existing transformations to be preserved when the scale pivot is modified. For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
[in] | vector | new scale pivot translation in centimeters |
[in] | space | transform space in which to set the scale translation |
MPoint rotatePivot | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the pivot about which the rotation is applied.
[in] | space | space in which to get the pivot |
[out] | ReturnStatus | return status |
MStatus setRotatePivot | ( | const MPoint & | point, |
MSpace::Space | space, | ||
bool | balance | ||
) |
Set the rotate pivot in centimeters about which rotation is applied.
If balance if true, then the overall transformation matrix will not change and a compensating transformation will be added to the rotate translate pivot to compensate for the pivot modification.
[in] | point | new rotation pivot in centimeters |
[in] | space | transform space in which to set the pivot |
[in] | balance | whether to balance the matrix |
MVector rotatePivotTranslation | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Return the rotate pivot translation in centimeters.
This component is used internally by maya when the user moves the rotate pivot, or when the balance flag is set to true in the MfnTransform::setRotatePivot method. It serves as a compensation that allows existing transformations to be preserved. For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
[in] | space | space in which to get the pivot translation |
[out] | ReturnStatus | return status |
MStatus setRotatePivotTranslation | ( | const MVector & | vector, |
MSpace::Space | space | ||
) |
Set the rotate pivot translation in centimeters.
This component is used internally by maya when the user moves the rotate pivot, or when the balance flag is true in the MFnTransform::setRotatePivot method. It serves as a compensation that allows existing transformations to be preserved when the rotate pivot is modified. For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
[in] | vector | new rotation pivot translation in centimeters |
[in] | space | transform space in which to set the rotation pivot translation |
MQuaternion rotateOrientation | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the rotation used to orient the local rotation space.
For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
[in] | space | space in which to get the rotation orientation. This argument is currently ignored. The rotateOrientation is always returned in local space: MSpace::kTransform. |
[out] | ReturnStatus | return status |
MStatus setRotateOrientation | ( | const MQuaternion & | quat, |
MSpace::Space | space, | ||
bool | balance | ||
) |
Set the rotation used to orient the local rotation space.
For the precise mathematics, refer to the transformation matrix details in the description section of MFnTransform.
If balance if true, then the overall transformation matrix will not change and the rotation will be modified to achieve this.
[in] | quat | new orientation as a quaternion |
[in] | space | transform space in which to set the rotateOrientation. This argument is currently ignored. The rotateOrientation always set in local space: MSpace::kTransform. |
[in] | balance | whether to balance the overall transformation matrix |
MTransformationMatrix::RotationOrder rotationOrder | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the rotation order for the transform matrix - the order in which the Euler angles are applied to create the end rotation.
[out] | ReturnStatus | return status |
MStatus setRotationOrder | ( | MTransformationMatrix::RotationOrder | order, |
bool | reorder | ||
) |
Change the rotation order for the transform - the order in which the Euler angles are applied to create the end rotation.
[in] | order | the order in which to apply rotations |
[in] | reorder | flag indicating whether or not rotations should be reordered. |
MTransformationMatrix restPosition | ( | MStatus * | ReturnStatus | ) | const |
Retrieve the saved rest position of this transform.
[out] | ReturnStatus | status code |
MStatus setRestPosition | ( | const MTransformationMatrix & | matrix | ) |
Change the saved rest position of this transform.
The rest position is not used internally by Maya. It is exclusively for use from the API as a temporary cache, which can be set and restored within a single Maya session. Note that the rest position is not saved with the scene.
[in] | matrix | the new rest position for this transform |
MStatus resetFromRestPosition | ( | ) |
Reset the transform to its rest position.
MStatus clearRestPosition | ( | ) |
Clear the saved rest position of this transform.
MStatus getRotation | ( | double | rotation[3], |
MTransformationMatrix::RotationOrder & | order, | ||
MSpace::Space | space | ||
) | const |
This method is obsolete.
The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument.
Retrieve the rotation component of this transformation.
[out] | rotation | Storage for the rotation components. |
[out] | order | Storage for the order of rotation. |
[in] | space | Ignored. |
MStatus setRotation | ( | const double | rotation[3], |
MTransformationMatrix::RotationOrder | order, | ||
MSpace::Space | space | ||
) |
This method is obsolete.
The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument.
Change the rotation component of this transformation.
[in] | rotation | The new rotation components. |
[in] | order | The order in which to apply the rotations. |
[in] | space | Ignored. |
MVector translation | ( | MSpace::Space | space, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
This method is obsolete.
Retrieve the translation component of this transformation in centimeters.
[in] | space | Transform space in which to get the translation. |
[out] | ReturnStatus | Return status. |
bool isLimited | ( | MFnTransform::LimitType | type, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Determine if the specified limit attribute is enabled or disabled.
[in] | type | type to query limit |
[out] | ReturnStatus | status code |
double limitValue | ( | MFnTransform::LimitType | type, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Determine the current value of the specified limit.
[in] | type | type to query limit |
[out] | ReturnStatus | status code |
MStatus setLimit | ( | MFnTransform::LimitType | type, |
double | value | ||
) |
Change the limit value for the specified limit type, and automatically enable the limit to be true.
[in] | type | type to apply a limit |
[in] | value | new limit value as internal unit |
MStatus enableLimit | ( | MFnTransform::LimitType | type, |
bool | flag | ||
) |
Enable or disable the limit value for the specified limit type.
[in] | type | type to apply a limit |
[in] | flag | true or false to enable |