C++ API Reference
|
Function set for multiple arrays of attributes for dependency node data. More...
#include <MFnArrayAttrsData.h>
Public Types | |
enum | Type { , kVectorArray, kDoubleArray, kIntArray, kStringArray } |
Public Types inherited from MFnData | |
enum | Type { kInvalid, kNumeric, kPlugin, kPluginGeometry, kString, kMatrix, kStringArray, kDoubleArray, kFloatArray, kIntArray, kPointArray, kVectorArray, kMatrixArray, kComponentList, kMesh, kLattice, kNurbsCurve, kNurbsSurface, kSphere, kDynArrayAttrs, kDynSweptGeometry, kSubdSurface, kNObject, kNId, kAny, kLast } |
Types of dependency graph data. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. More... | |
virtual | ~MFnArrayAttrsData () |
Destructor. | |
MFnArrayAttrsData () | |
Default constructor. | |
MFnArrayAttrsData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MStatus | clear () |
Clear the contents of all of the arrays. More... | |
unsigned int | count () const |
Returns the number of attribute arrays. More... | |
MStringArray | list (MStatus *ReturnStatus=NULL) const |
Returns a list of names for the attribute arrays. More... | |
bool | checkArrayExist (const MString attrName, MFnArrayAttrsData::Type &arrayType, MStatus *ReturnStatus=NULL) |
Check if the attribute array related to the given name has been created. More... | |
MVectorArray | vectorArray (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MVectorArray containing the vector array currently operated upon by the function set. More... | |
MDoubleArray | doubleArray (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MDoubleArray containing the double array currently operated upon by the function set. More... | |
MIntArray | intArray (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MIntArray containing the int array currently operated upon by the function set. More... | |
MStringArray | stringArray (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MStringArray containing the string array currently operated upon by the function set. More... | |
MObject | create (MStatus *ReturnStatus=NULL) |
Create a new MObject, attach it to this instance, and initialize it to be empty. More... | |
MVectorArray | getVectorData (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MVectorArray containing the vector array currently operated upon by the function set. More... | |
MDoubleArray | getDoubleData (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MDoubleArray containing the double array currently operated upon by the function set. More... | |
MIntArray | getIntData (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MIntArray containing the int array currently operated upon by the function set. More... | |
MStringArray | getStringData (const MString attrName, MStatus *ReturnStatus=NULL) |
Return an MStringArray containing the string array currently operated upon by the function set. More... | |
MFnArrayAttrsData (const MObject &object, MStatus *ReturnStatus=NULL) | |
NO SCRIPT SUPPORT. More... | |
Public Member Functions inherited from MFnData | |
virtual | ~MFnData () |
Destructor. | |
MFnData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MFnData () | |
Default class constructor. | |
MFnData (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
Public Member Functions inherited from MFnBase | |
virtual | ~MFnBase () |
Class Destructor. More... | |
bool | hasObj (MFn::Type) const |
Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More... | |
bool | hasObj (const MObject &) const |
Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More... | |
MObject | object (MStatus *ReturnStatus=NULL) const |
Returns the MObject that is attached to the Function Set. More... | |
virtual MStatus | setObject (MObject &object) |
Attaches the Function Set to the specified Maya Object. More... | |
virtual MStatus | setObject (const MObject &object) |
NO SCRIPT SUPPORT. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MFnData | |
static const char * | className () |
Returns the name of this class. More... | |
Static Public Member Functions inherited from MFnBase | |
static const char * | className () |
Returns the name of this class. More... | |
static const char * | typeString (MFn::Type) |
Returns the type string for a given type. More... | |
static bool | isValid (MFn::Type) |
Returns true if type is in the range of valid types. More... | |
Function set for multiple arrays of attributes for dependency node data.
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.
enum Type |
Enumerator | |
---|---|
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. |
MFnArrayAttrsData | ( | MObject & | object, |
MStatus * | ReturnStatus = NULL |
||
) |
MFnArrayAttrsData | ( | const MObject & | object, |
MStatus * | ReturnStatus = NULL |
||
) |
|
virtual |
Function set type.
Return the class type : MFn::kDynArrayAttrsData.
Reimplemented from MFnData.
|
static |
Returns the name of this class.
Return the class name : "MFnArrayAttrsData".
MStatus clear | ( | ) |
Clear the contents of all of the arrays.
unsigned int count | ( | ) | const |
Returns the number of attribute arrays.
MStringArray list | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns a list of names for the attribute arrays.
[out] | ReturnStatus | Status code. |
bool 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 |
[out] | arrayType | the type of the array |
[out] | ReturnStatus | kFailure if the instance is not attached to an MObject, and kSuccess otherwise. |
MVectorArray 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 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 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 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 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 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. |