#include <MFnGenericAttribute.h>
MFnGenericAttribute is a function set for attributes that can accept several types of data. A generic attribute is similar to a typed attribute (MFnTypedAttribute) except that it has a list of types that it considers valid.
If the attribute will only take one type of data then it is more efficient to use one of the other attribute function sets such as MFnTypedAttribute or MFnNumericAttribute.
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnGenericAttribute () |
Destructor. | |
MFnGenericAttribute () | |
Default constructor. | |
MFnGenericAttribute (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MObject | create (const MString &full, const MString &brief, MStatus *ReturnStatus=NULL) |
MStatus | addDataAccept (MFnData::Type newType) |
MStatus | addNumericDataAccept (MFnNumericData::Type newType) |
MStatus | addAccept (const MTypeId &id) |
MStatus | removeDataAccept (MFnData::Type oldType) |
MStatus | removeNumericDataAccept (MFnNumericData::Type oldType) |
MStatus | removeAccept (const MTypeId &id) |
MFnGenericAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MStatus | addAccept (MFnData::Type newType) |
Obsolete & no script support. | |
MStatus | addAccept (MFnNumericData::Type newType) |
Obsolete & no script support. | |
MStatus | removeAccept (MFnData::Type oldType) |
Obsolete & no script support. | |
MStatus | removeAccept (MFnNumericData::Type oldType) |
Obsolete & 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 |
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 MFnGenericAttribute::type | ( | ) | const [virtual] |
const char * MFnGenericAttribute::className | ( | ) | const [protected, virtual] |
MObject MFnGenericAttribute::create | ( | const MString & | full, | |
const MString & | brief, | |||
MStatus * | ReturnStatus = NULL | |||
) |
Creates a new generic attribute.
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] | full | int name of the attribute |
[in] | brief | short name of the attribute |
MStatus MFnGenericAttribute::addDataAccept | ( | MFnData::Type | newType | ) |
Add a new connection type that this attribute can accept.
[in] | newType | new type |
MStatus MFnGenericAttribute::addNumericDataAccept | ( | MFnNumericData::Type | newType | ) |
Add a new connection type that this attribute can accept.
[in] | newType | new type |
Add a new connection type that this attribute can accept. This method takes the type id (iff tag) of the data objects that can be accepted.
[in] | id | id of new type |
MStatus MFnGenericAttribute::removeDataAccept | ( | MFnData::Type | oldType | ) |
Remove one of the types that this attribute can accept.
[in] | oldType | old type that is no longer accepted |
MStatus MFnGenericAttribute::removeNumericDataAccept | ( | MFnNumericData::Type | oldType | ) |
Remove one of the types that this attribute can accept.
[in] | oldType | old type that is no longer accepted |
Remove one of the types that this attribute can accept. This method takes the type id (iff tag) of the data objects that can no longer be accepted.
[in] | id | id of old type that is no longer accepted |
MStatus MFnGenericAttribute::addAccept | ( | MFnData::Type | newType | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
MStatus MFnGenericAttribute::addAccept | ( | MFnNumericData::Type | newType | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
MStatus MFnGenericAttribute::removeAccept | ( | MFnData::Type | oldType | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
MStatus MFnGenericAttribute::removeAccept | ( | MFnNumericData::Type | oldType | ) |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |