Python API 2.0 Reference
OpenMaya.MFnEnumAttribute Class Reference
+ Inheritance diagram for OpenMaya.MFnEnumAttribute:

Public Member Functions

def __init__ ()
 
def addField ()
 
def create ()
 
def fieldName ()
 
def fieldValue ()
 
def getMax ()
 
def getMin ()
 
def setDefaultByName ()
 
- Public Member Functions inherited from OpenMaya.MFnAttribute
def __init__ ()
 
def accepts ()
 
def acceptsAttribute ()
 
def addToCategory ()
 
def getAddAttrCmd ()
 
def hasCategory ()
 
def setNiceNameOverride ()
 
- Public Member Functions inherited from OpenMaya.MFnBase
def __init__ ()
 
def hasObj ()
 
def object ()
 
def setObject ()
 
def type ()
 

Static Public Member Functions

def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnAttribute
def __new__ ()
 
- Static Public Member Functions inherited from OpenMaya.MFnBase
def __new__ ()
 

Properties

 default = property(...)
 
- Properties inherited from OpenMaya.MFnAttribute
 affectsAppearance = property(...)
 
 affectsWorldSpace = property(...)
 
 array = property(...)
 
 cached = property(...)
 
 channelBox = property(...)
 
 connectable = property(...)
 
 disconnectBehavior = property(...)
 
 dynamic = property(...)
 
 extension = property(...)
 
 hidden = property(...)
 
 indeterminant = property(...)
 
 indexMatters = property(...)
 
 internal = property(...)
 
 isProxyAttribute = property(...)
 
 keyable = property(...)
 
 name = property(...)
 
 parent = property(...)
 
 readable = property(...)
 
 renderSource = property(...)
 
 shortName = property(...)
 
 storable = property(...)
 
 usedAsColor = property(...)
 
 usedAsFilename = property(...)
 
 usesArrayDataBuilder = property(...)
 
 worldSpace = property(...)
 
 writable = property(...)
 

Additional Inherited Members

- Static Public Attributes inherited from OpenMaya.MFnAttribute
int kDelete = 0
 
int kNothing = 2
 
int kReset = 1
 

Detailed Description

Functionset for creating and working with enumeration attributes.

Method resolution order:
-   MFnEnumAttribute
-   MFnAttribute
-   MFnBase
-   builtins.object

Base Class

MFnAttribute<h2>Constructors

SignatureParametersDescription
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.

 


Constructor & Destructor Documentation

def OpenMaya.MFnEnumAttribute.__init__ ( )
Initialize self.  See help(type(self)) for accurate signature.

Member Function Documentation

def OpenMaya.MFnEnumAttribute.__new__ ( )
static
Create and return a new object.  See help(type) for accurate 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).

Property Documentation

OpenMaya.MFnEnumAttribute.default = property(...)
static
 Default value
Name: default
Type: int
Access: RW
Description: Default value of attr.