#include <MFnEnumAttribute.h>


Function set for enumerated attributes. These attributes accept fields as input. Each field consists of a short and its associated string, which is a descriptive name for the field.
Public Member Functions | |
| virtual MFn::Type | type () const |
| Function set type. | |
| virtual | ~MFnEnumAttribute () |
| Destructor. | |
| MFnEnumAttribute () | |
| Default constructor. | |
| MFnEnumAttribute (MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. | |
| MObject | create (const MString &fullName, const MString &briefName, short defaultValue=0, MStatus *ReturnStatus=NULL) |
| MStatus | addField (const MString &fieldString, short index) |
| MString | fieldName (short index, MStatus *ReturnStatus=NULL) const |
| short | fieldIndex (const MString &fieldString, MStatus *ReturnStatus=NULL) const |
| MStatus | getMin (short &minValue) const |
| MStatus | getMax (short &maxValue) const |
| MStatus | setDefault (short index) |
| MStatus | setDefault (const MString &fieldString) |
| MStatus | getDefault (short &index) const |
| MString | defaultValue (MStatus *ReturnStatus=NULL) const |
| MFnEnumAttribute (const MObject &object, MStatus *ReturnStatus=NULL) | |
| Constructor. | |
| MStatus | getDefault (MString &fieldString) const |
| 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 MFnEnumAttribute::type | ( | ) | const [virtual] |
| const char * MFnEnumAttribute::className | ( | ) | const [protected, virtual] |
| MObject MFnEnumAttribute::create | ( | const MString & | fullName, | |
| const MString & | briefName, | |||
| short | defaultValue = 0, |
|||
| MStatus * | ReturnStatus = NULL | |||
| ) |
Creates an enumerated 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] | defaultValue | The default value of the attribute |
| [out] | ReturnStatus | Status code for the operation. |
Add a field (a string/index pair) to the enumeration
| [in] | fieldString | The string describing the field |
| [in] | index | The index of the field |
Retrieve the string associated with a given index
| [in] | index | The index of the string to look up |
| [out] | ReturnStatus | Status code for the operation. |
| short MFnEnumAttribute::fieldIndex | ( | const MString & | fieldString, | |
| MStatus * | ReturnStatus = NULL | |||
| ) | const |
Retrieve the index associated with a given string.
| [in] | fieldString | The string describing the field. |
| [out] | ReturnStatus | Status code for the operation. |
| MStatus MFnEnumAttribute::getMin | ( | short & | minValue | ) | const |
Return the minimum value for this attribute.
| [out] | minValue | the minimum value for this attribute |
| MStatus MFnEnumAttribute::getMax | ( | short & | maxValue | ) | const |
Return the maximum value for this attribute.
| [out] | maxValue | the maximum value for this attribute |
| MStatus MFnEnumAttribute::setDefault | ( | short | index | ) |
Set a new default value for this enum attribute.
| [in] | index | new the default value for this attribute |
Set a new default value for this enum attribute.
| [in] | fieldString | new the default value for this attribute |
| MStatus MFnEnumAttribute::getDefault | ( | short & | index | ) | const |
Get the default value for the enum attribute.
| [out] | index | default index value. |
Get the default value for the enum attribute.
| [out] | ReturnStatus | Optional status code. See below. |
NO SCRIPT SUPPORT.
Get the default value for the enum attribute.
Python Notes
This method is not supported in Python. Please see defaultValue()
| [out] | fieldString | the string value for the default enum |
| Autodesk® Maya® 2010 © 1997-2009 Autodesk, Inc. All rights reserved. |
Generated with
|