#include <MFnMatrixAttribute.h>
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.
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) |
MStatus | getDefault (MMatrix &def) |
MStatus | getDefault (MFloatMatrix &def) |
MStatus | setDefault (const MMatrix &def) |
MStatus | setDefault (const MFloatMatrix &def) |
MFnMatrixAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
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 |
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 MFnMatrixAttribute::type | ( | ) | const [virtual] |
const char * MFnMatrixAttribute::className | ( | ) | const [protected, virtual] |
MObject MFnMatrixAttribute::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 MFnMatrixAttribute::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 MFnMatrixAttribute::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 |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |