MFnTransform Class Reference
[OpenMaya - API module for common classesFunctionSet classes]

#include <MFnTransform.h>
Inheritance diagram for MFnTransform:
Inheritance graph
[legend]
Collaboration diagram for MFnTransform:
Collaboration graph
[legend]

List of all members.


Detailed Description

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.

Examples:

closestPointOnNurbsSurfaceCmd.cpp, customAttrManip.cpp, footPrintManip.cpp, geometrySurfaceConstraint.cpp, intersectOnNurbsSurfaceCmd.cpp, lineManip.cpp, lineManipContainer.cpp, moveNumericTool.cpp, moveTool.cpp, simpleSolverNode.cpp, squareScaleManip.cpp, squareScaleManipContext.cpp, surfaceBumpManip.cpp, and swissArmyManip.cpp.


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)
MTransformationMatrix  transformation (MStatus *ReturnStatus=NULL) const
MStatus  set (const MTransformationMatrix &transform)
MStatus  getScale (double scale[3]) const
MStatus  setScale (const double scale[3])
MStatus  scaleBy (const double scale[3])
MStatus  getShear (double scale[3]) const
MStatus  setShear (const double shear[3])
MStatus  shearBy (const double shear[3])
MStatus  getRotation (MQuaternion &quaternion, MSpace::Space=MSpace::kTransform) const
MStatus  setRotation (const MQuaternion &quaternion, MSpace::Space=MSpace::kTransform)
MStatus  rotateBy (const MQuaternion &quaternion, MSpace::Space=MSpace::kTransform)
MStatus  getRotation (MEulerRotation &rotation) const
MStatus  setRotation (const MEulerRotation &rotation)
MStatus  rotateBy (const MEulerRotation &rotation, MSpace::Space=MSpace::kTransform)
MStatus  getRotationQuaternion (double &x, double &y, double &z, double &w, MSpace::Space=MSpace::kTransform) const
MStatus  setRotationQuaternion (double x, double y, double z, double w, MSpace::Space=MSpace::kTransform)
MStatus  rotateByQuaternion (double x, double y, double z, double w, MSpace::Space=MSpace::kTransform)
MStatus  getRotation (double rotation[3], MTransformationMatrix::RotationOrder &order) const
MStatus  setRotation (const double rotation[3], MTransformationMatrix::RotationOrder order)
MStatus  rotateBy (const double rotation[3], MTransformationMatrix::RotationOrder order, MSpace::Space=MSpace::kTransform)
MVector  getTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setTranslation (const MVector &vec, MSpace::Space space)
MStatus  translateBy (const MVector &vec, MSpace::Space space)
MPoint  scalePivot (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setScalePivot (const MPoint &point, MSpace::Space space, bool balance)
MVector  scalePivotTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setScalePivotTranslation (const MVector &vec, MSpace::Space space)
MPoint  rotatePivot (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setRotatePivot (const MPoint &point, MSpace::Space space, bool balance)
MVector  rotatePivotTranslation (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setRotatePivotTranslation (const MVector &vec, MSpace::Space space)
MQuaternion  rotateOrientation (MSpace::Space space, MStatus *ReturnStatus=NULL) const
MStatus  setRotateOrientation (const MQuaternion &quat, MSpace::Space space, bool balance)
MTransformationMatrix::RotationOrder  rotationOrder (MStatus *ReturnStatus=NULL) const
MStatus  setRotationOrder ( MTransformationMatrix::RotationOrder order, bool reorder)
MTransformationMatrix  restPosition (MStatus *ReturnStatus) const
MStatus  setRestPosition (const MTransformationMatrix &matrix)
MStatus  resetFromRestPosition ()
MStatus  clearRestPosition ()
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
double  limitValue (MFnTransform::LimitType type, MStatus *ReturnStatus=NULL) const
MStatus  setLimit (MFnTransform::LimitType type, double value)
MStatus  enableLimit (MFnTransform::LimitType type, bool flag)
  MFnTransform (const MObject &object, MStatus *ret=NULL)
  Constructor.

Protected Member Functions

virtual const char *  className () const
  Class name.

Member Enumeration Documentation

Limit types.

Enumerator:
kScaleMinX   
kScaleMaxX   
kScaleMinY   
kScaleMaxY   
kScaleMinZ   
kScaleMaxZ   
kShearMinXY   
kShearMaxXY   
kShearMinXZ   
kShearMaxXZ   
kShearMinYZ   
kShearMaxYZ   
kRotateMinX   
kRotateMaxX   
kRotateMinY   
kRotateMaxY   
kRotateMinZ   
kRotateMaxZ   
kTranslateMinX   
kTranslateMaxX   
kTranslateMinY   
kTranslateMaxY   
kTranslateMinZ   
kTranslateMaxZ   

Constructor & Destructor Documentation

MFnTransform::~MFnTransform (  )  [virtual]

Destructor.

Class Destructor

MFnTransform::MFnTransform ( MObject object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in]  object  The MObject to attach the function set to
[out]  ReturnStatus  the return status
Status Codes:

MFnTransform::MFnTransform ( const MDagPath object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given constant MDagPath object.

Parameters:
[in]  object  The const MDagPath to attach the function set to
[out]  ReturnStatus  The return status
Status Codes:

MFnTransform::MFnTransform ( const MObject object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in]  object  The MObject to attach the function set to
[out]  ReturnStatus  the return status
Status Codes:

Member Function Documentation

MFn::Type MFnTransform::type (  )  const [virtual]

const char * MFnTransform::className (  )  const [protected, virtual]

MObject MFnTransform::create ( MObject  parent = MObject::kNullObj,
MStatus ReturnStatus = NULL  
)

Creates a new transformation node. The new node is placed in the DAG.

Parameters:
[in]  parent  the parent of the transform to be created
[out]  ReturnStatus  status code
Returns:
The newly created transform node object
Status Codes:

Reimplemented in MFnHikEffector, MFnIkEffector, and MFnIkJoint.

MTransformationMatrix MFnTransform::transformation ( MStatus ReturnStatus = NULL  )  const

Retrieve the transformation matrix represented by this transform.

Parameters:
[out]  ReturnStatus  status code
Returns:
The transformation matrix represented by this transform.
Status Codes:

MStatus MFnTransform::set ( const MTransformationMatrix transform  ) 

Change this transform to equal the given matrix.

Parameters:
[in]  transform  the matrix to copy
Returns:
status code
Status Codes:

MStatus MFnTransform::getScale ( double  scale[3]  )  const

Retrieve the scaling component of this transformation.

Parameters:
[out]  scale  Storage for the scale of the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::setScale ( const double  scale[3]  ) 

Set the scaling component of this transformation.

Parameters:
[in]  scale  The scale of the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::scaleBy ( const double  scale[3]  ) 

Relatively scale this transformation.

Parameters:
[in]  scale  The ratio by which to scale the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::getShear ( double  shear[3]  )  const

Retrieve the shearing component of this transformation.

Parameters:
[out]  shear  Storage for the shear of the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::setShear ( const double  shear[3]  ) 

Set the shearing component of this transformation.

Parameters:
[in]  shear  The shear of the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::shearBy ( const double  shear[3]  ) 

Relatively shear this transformation.

Parameters:
[in]  shear  The ratio by which to shear the transform
Returns:
Status code
Status Codes:

MStatus MFnTransform::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.

Parameters:
[out]  quaternion  the quaternion
[in]  space  transform space in which to get the rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  quaternion  the quaternion
[in]  space  transform space in which to perform the rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::rotateBy ( const MQuaternion quaternion,
MSpace::Space  space = MSpace::kTransform  
)

Relatively change the rotation of this transformation using a quaternion.

Parameters:
[in]  quaternion  the quaternion
[in]  space  transform space in which to perform the rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::getRotation ( MEulerRotation rotation  )  const

Retrieve the rotation component of this transformation. The rotation is retrieved in MSpace::kTransform space.

Parameters:
[out]  rotation  the euler rotation in radians
Returns:
Status code
Status Codes:

MStatus MFnTransform::setRotation ( const MEulerRotation rotation  ) 

Change the rotation component of this transformation. The rotation is set in MSpace::kTransform space.

Parameters:
[in]  rotation  the euler rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::rotateBy ( const MEulerRotation rotation,
MSpace::Space  space = MSpace::kTransform  
)

Relatively change the rotation component of this transformation.

Parameters:
[in]  rotation  the euler rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::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.

Parameters:
[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
Returns:
Status code
Status Codes:

MStatus MFnTransform::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.

Parameters:
[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
Returns:
Status code
Status Codes:

MStatus MFnTransform::rotateByQuaternion ( double  x,
double  y,
double  z,
double  w,
MSpace::Space  space = MSpace::kTransform  
)

Relatively change the rotation of this transformation using a quaternion.

Parameters:
[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
Returns:
Status code
Status Codes:

MStatus MFnTransform::getRotation ( double  rotation[3],
MTransformationMatrix::RotationOrder order  
) const

Retrieve the rotation component of this transformation. The rotation is retrieved in MSpace::kTransform space.

Parameters:
[out]  rotation  storage for the rotation components
[in]  order  storage for the order of rotation
Returns:
Status code
Status Codes:

MStatus MFnTransform::setRotation ( const double  rotation[3],
MTransformationMatrix::RotationOrder  order  
)

Change the rotation component of this transformation. The rotation is set in MSpace::kTransform space.

Parameters:
[in]  rotation  the new rotation components
[in]  order  the order in which to apply the rotations
Returns:
Status code
Status Codes:

MStatus MFnTransform::rotateBy ( const double  rotation[3],
MTransformationMatrix::RotationOrder  order,
MSpace::Space  space = MSpace::kTransform  
)

Relatively change the rotation component of this transformation.

Parameters:
[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
Returns:
Status code
Status Codes:

MVector MFnTransform::getTranslation ( MSpace::Space  space,
MStatus ReturnStatus = NULL  
) const

Retrieve the translation component of this transformation in centimeters.

Parameters:
[in]  space  transform space in which to get the translation
[out]  ReturnStatus  return status
Returns:
Translation vector in centimeters
Status Codes:

MStatus MFnTransform::setTranslation ( const MVector vector,
MSpace::Space  space  
)

Change the translation component of this transformation.

Parameters:
[in]  vector  the new translation vector in centimeters
[in]  space  transform space in which to perform the translation
Returns:
Status code
Status Codes:

MStatus MFnTransform::translateBy ( const MVector vector,
MSpace::Space  space  
)

Relatively change the translation component of this transformation.

Parameters:
[in]  vector  the relative translation vector
[in]  space  transform space in which to perform the translation
Returns:
Status code
Status Codes:

MPoint MFnTransform::scalePivot ( MSpace::Space  space,
MStatus ReturnStatus = NULL  
) const

Returns the pivot around which the scale is applied. The pivot will be in centimeters.

Parameters:
[in]  space  space in which to get the pivot
[out]  ReturnStatus  return status
Returns:
Scale pivot point in centimeters
Status Codes:

MStatus MFnTransform::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.

Parameters:
[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
Returns:
Return status
Status Codes:

MVector MFnTransform::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.

Parameters:
[in]  space  space in which to get the scale pivot translation
[out]  ReturnStatus  return status
Returns:
Scale pivot translation in centimeters
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  vector  new scale pivot translation in centimeters
[in]  space  transform space in which to set the scale translation
Returns:
Return status
Status Codes:

MPoint MFnTransform::rotatePivot ( MSpace::Space  space,
MStatus ReturnStatus = NULL  
) const

Returns the pivot about which the rotation is applied.

Parameters:
[in]  space  space in which to get the pivot
[out]  ReturnStatus  return status
Returns:
Rotation pivot point in centimeters
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  point  new rotation pivot in centimeters
[in]  space  transform space in which to set the pivot
[in]  balance  whether to balance the matrix
Returns:
Return status
Status Codes:

MVector MFnTransform::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.

Parameters:
[in]  space  space in which to get the pivot translation
[out]  ReturnStatus  return status
Returns:
Scale pivot translation in centimeters
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  vector  new rotation pivot translation in centimeters
[in]  space  transform space in which to set the rotation pivot translation
Returns:
Return status
Status Codes:

MQuaternion MFnTransform::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.

Parameters:
[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
Returns:
Rotateorientation
Status Codes:

MStatus MFnTransform::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.

Parameters:
[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
Returns:
Return status
Status Codes:

MTransformationMatrix::RotationOrder MFnTransform::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.

Parameters:
[out]  ReturnStatus  return status
Returns:
rotation order
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  order  the order in which to apply rotations
[in]  reorder  flag indicating whether or not rotations should be reordered.
Returns:
status code
Status Codes:

MTransformationMatrix MFnTransform::restPosition ( MStatus ReturnStatus  )  const

Retrieve the saved rest position of this transform.

Parameters:
[out]  ReturnStatus  status code
Returns:
The transformation matrix equivalent to the transform's rest position. This rest position will be identity unless the "setRestPosition" method has been called.
Status Codes:

MStatus MFnTransform::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.

Parameters:
[in]  matrix  the new rest position for this transform
Returns:
status code
Status Codes:

MStatus MFnTransform::resetFromRestPosition (  ) 

Reset the transform to its rest position.

Returns:
status code
Status Codes:

MStatus MFnTransform::clearRestPosition (  ) 

Clear the saved rest position of this transform.

Returns:
status code
Status Codes:

MStatus MFnTransform::getRotation ( double  rotation[3],
MTransformationMatrix::RotationOrder order,
MSpace::Space  space  
) const

This method is obsolete.

Deprecated:
Use the other MFnTransform::getRotation method instead.
The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument.

Retrieve the rotation component of this transformation.

Parameters:
[out]  rotation  Storage for the rotation components.
[in]  order  Storage for the order of rotation.
[in]  space  Ingored.
Returns:
Status code
Status Codes:

MStatus MFnTransform::setRotation ( const double  rotation[3],
MTransformationMatrix::RotationOrder  order,
MSpace::Space  space  
)

This method is obsolete.

Deprecated:
Use the other MFnTransform::setRotation method instead.
The transformation space argument was always treated as MSpace::kTransform regardless of the actual argument.

Change the rotation component of this transformation.

Parameters:
[in]  rotation  The new rotation components.
[in]  order  The order in which to apply the rotations.
[in]  space  Ignored.
Returns:
Status code
Status Codes:

MVector MFnTransform::translation ( MSpace::Space  space,
MStatus ReturnStatus = NULL  
) const

This method is obsolete.

Deprecated:
Use the method MFnTransform::getTranslation instead.
Retrieve the translation component of this transformation in centimeters.
Parameters:
[in]  space  Transform space in which to get the translation.
[out]  ReturnStatus  Return status.
Returns:
Translation vector in centimeters
Status Codes:

bool MFnTransform::isLimited ( MFnTransform::LimitType  type,
MStatus ReturnStatus = NULL  
) const

Determine if the specified limit attribute is enabled or disabled.

Parameters:
[in]  type  type to query limit
[out]  ReturnStatus  status code
Returns:
True or false, true means the limit is enabled.
Status Codes:

double MFnTransform::limitValue ( MFnTransform::LimitType  type,
MStatus ReturnStatus = NULL  
) const

Determine the current value of the specified limit.

Parameters:
[in]  type  type to query limit
[out]  ReturnStatus  status code
Returns:
Current value of the specified limit as internal unit.
Status Codes:

MStatus MFnTransform::setLimit ( MFnTransform::LimitType  type,
double  value  
)

Change the limit value for the specified limit type, and automatically enable the limit to be true.

Parameters:
[in]  type  type to apply a limit
[in]  value  new limit value as internal unit
Returns:
status code
Status Codes:

MStatus MFnTransform::enableLimit ( MFnTransform::LimitType  type,
bool  flag  
)

Enable or disable the limit value for the specified limit type.

Parameters:
[in]  type  type to apply a limit
[in]  flag  true or false to enable
Returns:
status code
Status Codes:

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6