OpenMaya.MFnEnumAttribute Class Reference

OpenMaya.MFnEnumAttribute Class Reference

Class Description

Functionset for creating and working with enumeration attributes.

Method resolution order:
-   MFnEnumAttribute
-   MFnAttribute
-   MFnBase
-   __builtin__.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.

 


+ Inheritance diagram for OpenMaya.MFnEnumAttribute:

Public Member Functions

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

Properties

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

Additional Inherited Members

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

Constructor & Destructor Documentation

OpenMaya.MFnEnumAttribute.__init__ ( )
x.__init__(...) initializes x; see help(type(x)) for signature

Member Function Documentation

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