#include <MFnArrayAttrsData.h>
MFnArrayAttrsData allows the creation and manipulation of multiple arrays of attributes as a data object over a single connection for use as dependency graph data.
If a user written dependency node either accepts or produces MFnArrayAttrsData, then this class is used to extract or create the data that comes from or goes to other dependency graph nodes. The MDataHandle::type method will return kDynArrayAttrsData when data of this type is present. To access it, the MDataHandle::data() method is used to get an MObject for the data and this should then be used to initialize an instance of MFnArrayAttrsData.
NOTE: these data attributes are not storable.
Public Types | |
enum | Type { kInvalid, kVectorArray, kDoubleArray, kIntArray, kStringArray, kLast } |
Types of dependency graph data. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnArrayAttrsData () |
Destructor. | |
MFnArrayAttrsData () | |
Default constructor. | |
MFnArrayAttrsData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MStatus | clear () |
unsigned int | count () const |
MStringArray | list (MStatus *ReturnStatus=NULL) const |
bool | checkArrayExist (const MString attrName, MFnArrayAttrsData::Type &arrayType, MStatus *ReturnStatus=NULL) |
MVectorArray | vectorArray (const MString attrName, MStatus *ReturnStatus=NULL) |
MDoubleArray | doubleArray (const MString attrName, MStatus *ReturnStatus=NULL) |
MIntArray | intArray (const MString attrName, MStatus *ReturnStatus=NULL) |
MStringArray | stringArray (const MString attrName, MStatus *ReturnStatus=NULL) |
MObject | create (MStatus *ReturnStatus=NULL) |
MVectorArray | getVectorData (const MString attrName, MStatus *ReturnStatus=NULL) |
MDoubleArray | getDoubleData (const MString attrName, MStatus *ReturnStatus=NULL) |
MIntArray | getIntData (const MString attrName, MStatus *ReturnStatus=NULL) |
MStringArray | getStringData (const MString attrName, MStatus *ReturnStatus=NULL) |
MFnArrayAttrsData (const MObject &object, MStatus *ReturnStatus=NULL) | |
NO SCRIPT SUPPORT. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
Types of dependency graph data.
kInvalid | Invalid value. |
kVectorArray | use vectorArray() method to extract the attribute array. |
kDoubleArray | use doubleArray() method to extract the attribute array. |
kIntArray | use intArray() method to extract the attribute array. |
kStringArray | use stringArray() method to extract the attribute array. |
kLast | Last value. It does not represent real data, but can be used to loop on all possible types |
Reimplemented from MFnData.
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 |
NO SCRIPT SUPPORT.
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 MFnArrayAttrsData::type | ( | ) | const [virtual] |
const char * MFnArrayAttrsData::className | ( | ) | const [protected, virtual] |
MStatus MFnArrayAttrsData::clear | ( | ) |
Clear the contents of all of the arrays.
unsigned int MFnArrayAttrsData::count | ( | ) | const |
Returns the number of attribute arrays.
MStringArray MFnArrayAttrsData::list | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns a list of names for the attribute arrays.
[out] | ReturnStatus | Status code. |
bool MFnArrayAttrsData::checkArrayExist | ( | const MString | name, | |
MFnArrayAttrsData::Type & | arrayType, | |||
MStatus * | ReturnStatus = NULL | |||
) |
Check if the attribute array related to the given name has been created. If the named array exists return true and the array data type.
[in] | name | the name of the array to check |
[in] | arrayType | the type of the array to extract |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MVectorArray MFnArrayAttrsData::vectorArray | ( | const MString | name, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MVectorArray containing the vector array currently operated upon by the function set. The MVectorArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.
[in] | name | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MDoubleArray MFnArrayAttrsData::doubleArray | ( | const MString | name, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MDoubleArray containing the double array currently operated upon by the function set. The MDoubleArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.
[in] | name | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
Return an MIntArray containing the int array currently operated upon by the function set. The MIntArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.
[in] | name | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MStringArray MFnArrayAttrsData::stringArray | ( | const MString | name, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MStringArray containing the string array currently operated upon by the function set. The MStringArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.
[in] | name | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MVectorArray MFnArrayAttrsData::getVectorData | ( | const MString | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MVectorArray containing the vector array currently operated upon by the function set. The MVectorArray returned by this method is read only. If the array did not exist it will be created.
[in] | attrName | the name of the array to read |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MDoubleArray MFnArrayAttrsData::getDoubleData | ( | const MString | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MDoubleArray containing the double array currently operated upon by the function set. The MDoubleArray returned by this method is read only. If the array did not exist it will be created.
[in] | attrName | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
Return an MIntArray containing the int array currently operated upon by the function set. The MIntArray returned by this method is read only. If the array did not exist it will be created.
[in] | attrName | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MStringArray MFnArrayAttrsData::getStringData | ( | const MString | attrName, | |
MStatus * | ReturnStatus = NULL | |||
) |
Return an MStringArray containing the string array currently operated upon by the function set. The MStringArray returned by this method is read only. If the array did not exist it will be created.
[in] | attrName | the name of the array to edit or create. |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |