Matrix attribute function set.
Function object for matrix attributes. These attributes accept either a matrix of float values or double values depending on the type specified to the create method.
#include <MFnMatrixAttribute.h>

Public Types |
|
| enum | Type { kFloat, kDouble } |
|
Matrix data type. More... |
|
Public Member Functions |
|
| virtual MFn::Type | type () const |
| Function set type. |
|
| virtual | ~MFnMatrixAttribute () |
| Destructor. |
|
| MFnMatrixAttribute () | |
| Default constructor. |
|
| MFnMatrixAttribute (MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. |
|
| MObject | create (const MString &fullName, const MString &briefName, Type matrixType=kDouble, MStatus *ReturnStatus=NULL) |
| Creates a matrix attribute object. |
|
| MStatus | getDefault (MMatrix &def) |
| Gets the default value for the attribute.
|
|
| MStatus | getDefault (MFloatMatrix &def) |
| Gets the default value for the attribute.
|
|
| MStatus | setDefault (const MMatrix &def) |
| Sets the default value for the attribute.
|
|
| MStatus | setDefault (const MFloatMatrix &def) |
| Sets the default value for the attribute.
|
|
| MFnMatrixAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. |
|
Protected Member Functions |
|
| virtual const char * | className () const |
| Class name. |
|
| enum Type |
Matrix data type.
| MFnMatrixAttribute | ( | 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 |
| MFnMatrixAttribute | ( | 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] |
| const char * className | ( | ) | const [protected, virtual] |
| MObject create | ( | const MString & | fullName, |
| const MString & | briefName, | ||
| Type | matrixType =
kDouble, |
||
| MStatus * | ReturnStatus =
NULL |
||
| ) |
Creates a matrix attribute object.
The create method needs to be called on a per node basis. That means if you want to create and add the same attribute to multiple nodes, you need to call the create method for each node to get a unique MObject back. If you call create just once and add the attribute to multiple nodes, Maya will encounter a fatal error.
| [in] | fullName | The full name of the attribute |
| [in] | briefName | The brief name of the attribute |
| [in] | matrixType | Whether to create a matrix of floats or doubles |
| [out] | ReturnStatus | Status code for the operation. |
Gets the default value for the attribute.
Use this for getting the default value of a double matrix attribute.
| [out] | def | returns the default matrix value |
| MStatus getDefault | ( | MFloatMatrix & | def | ) |
Gets the default value for the attribute.
Use this for getting the default value of a float matrix attribute.
| [out] | def | returns the default matrix value |
Sets the default value for the attribute.
Use this for setting the defaults of a double matrix attribute.
| [in] | def | matrix value |
| MStatus setDefault | ( | const MFloatMatrix & | def | ) |
Sets the default value for the attribute.
Use this for setting the defaults of a float matrix attribute.
| [in] | def | matrix value |