#include <MFnComponentListData.h>
MFnComponentListData allows the creation and manipulation of component list (represented as MObjects) data objects for use in the dependency graph.
If a user written dependency node either accepts or produces MObjects containing component lists, then this class is used to extract or create the data that comes from or goes to other dependency graph nodes. 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 MFnComponentListData.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnComponentListData () |
Destructor. | |
MFnComponentListData () | |
Default constructor. | |
MFnComponentListData (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
unsigned int | length (MStatus *ReturnStatus=NULL) const |
bool | has (const MObject &obj, MStatus *ReturnStatus=NULL) const |
MObject | operator[] (unsigned int index) const |
MStatus | add (MObject &) |
MStatus | remove (const MObject &) |
MStatus | remove (unsigned int index) |
MStatus | clear () |
MObject | create (MStatus *ReturnStatus=NULL) |
MFnComponentListData (const MObject &object, MStatus *ReturnStatus=NULL) | |
NO SCRIPT SUPPORT. | |
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 |
MFnComponentListData::MFnComponentListData | ( | const MObject & | object, | |
MStatus * | ReturnStatus = NULL | |||
) |
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 MFnComponentListData::type | ( | ) | const [virtual] |
const char * MFnComponentListData::className | ( | ) | const [protected, virtual] |
unsigned int MFnComponentListData::length | ( | MStatus * | ReturnStatus = NULL |
) | const |
Return the number of components in the instance.
[out] | ReturnStatus | Status code. |
MObject MFnComponentListData::operator[] | ( | unsigned int | index | ) | const |
Extract the indicated component from the const instance. No checking is done by this class to ensure that the index is valid - use the length method to determine the size of the array. If the instance is not attached to an MObject, this method will return MObject::kNullObj.
[in] | index | the index of the component to extract |
Add the given component to the component list.
[in] | obj | an MObject containing the component to add |
MStatus MFnComponentListData::remove | ( | unsigned int | index | ) |
Remove the indicated component from the component list.
[in] | index | the index of the component to remove |
MStatus MFnComponentListData::clear | ( | ) |
Remove all components from the component list
Create a new MObject, attach it to this instance, and initialize it to contain an empty component list.
[out] | ReturnStatus | kSuccess |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |