OpenMaya.MFnEnumAttribute Class Reference
Functionset for creating and working with enumeration attributes.
Method resolution order:
- MFnEnumAttribute
- MFnAttribute
- MFnBase
- __builtin__.object
Base Class
MFnAttribute<h2>Constructors
Signature Parameters Description
MFnEnumAttribute() Default constructor. Returns a new MFnEnumAttribute function set with no Maya object attached.
MFnEnumAttribute(object) object - MObject Returns a new MFnEnumAttribute function set, attached to the specified Maya object .
OpenMaya.MFnEnumAttribute.__init__
(
)
x.__init__(...) initializes x; see help(type(x)) for signature
OpenMaya.MFnEnumAttribute.addField
(
)
Add an item to the enumeration with a specified UI name and corresponding attribute value.
Signature: addField(name, value)
Parameters: name - string
value - int
Returns: Reference to self.
Description: Add an item to the enumeration with the specified UI name and corresponding attribute value .
OpenMaya.MFnEnumAttribute.create
(
)
Creates a new enumeration attribute, attaches it to the function set and returns it as an MObject.
Signature: create(longName, shortName, defaultValue=0)
Parameters: longName - string
shortName - string
defaultValue - int
Returns: MObject
Description: Create a new enum attribute with the given longName , shortName and defaultValue , attach it to the function set and return it in an MObject .
OpenMaya.MFnEnumAttribute.fieldName
(
)
Returns the name of the enumeration item which has a given value.
Signature: fieldName(value)
Parameters: value - int
Returns: string
Description: Returns the name of the enumeration item which has the given value .
OpenMaya.MFnEnumAttribute.fieldValue
(
)
Returns the value of the enumeration item which has a given name.
Signature: fieldValue(name)
Parameters: name - string
Returns: int
Description: Returns the value of the enumeration item which has the given name .
OpenMaya.MFnEnumAttribute.getMax
(
)
Returns the maximum value of all the enumeration items.
Signature: getMax()
Parameters:
Returns: int
Description: Returns the maximum value of all the enumeration items.
OpenMaya.MFnEnumAttribute.getMin
(
)
Returns the minimum value of all the enumeration items.
Signature: getMin()
Parameters:
Returns: int
Description: Returns the minimum value of all the enumeration items.
OpenMaya.MFnEnumAttribute.setDefaultByName
(
)
Set the default value using the name of an enumeration item. Equivalent to: attr.default = attr.fieldValue(name)
Signature: setDefaultByName(name)
Parameters: name - string
Returns: Reference to self.
Description: Set the default value using the name of an enumeration item. Equivalent to attr.default = attr.fieldValue(name) .
OpenMaya.MFnEnumAttribute.default
static
Default value
Name: default
Type: int
Access: RW
Description: Default value of attr.
The documentation for this class was generated from the following files:
D:/Maya-MD-Merge/input/python/2.0/OpenMaya.py
D:/Maya-MD-Merge/input/python/extras.dox