| Python API 2.0 Reference
    | 
 Inheritance diagram for OpenMaya.MFnAttribute:
 Inheritance diagram for OpenMaya.MFnAttribute:| Public Member Functions | |
| 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 Attributes | |
| Disconnect Behavior | |
| int | kDelete = 0 | 
| int | kNothing = 2 | 
| int | kReset = 1 | 
| Properties | |
| 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(...) | |
Base class for attribute functionsets. Method resolution order: - MFnAttribute - MFnBase - __builtin__.object
MFnBase<h2>Constructors
| Signature | Parameters | Description | 
|---|---|---|
| MFnAttribute() | Default constructor. Returns a new MFnAttribute function set with no Maya object attached. | |
| MFnAttribute(object) | object - MObject | Returns a new MFnAttribute function set, attached to the specified Maya object. | 
| def OpenMaya.MFnAttribute.__init__ | ( | ) | 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| OpenMaya.MFnAttribute.accepts | ( | ) | 
| def OpenMaya.MFnAttribute.acceptsAttribute | ( | ) | 
Returns True if this attribute can accept a connection with the given attribute.
| def OpenMaya.MFnAttribute.addToCategory | ( | ) | 
Adds the attribute to a category
| OpenMaya.MFnAttribute.getAddAttrCmd | ( | ) | 
Returns a string containing a MEL 'addAttr' command capable of recreating the attribute.
| Signature: | getAddAttrCmd(longFlags=False) | 
| Parameters: | longFlags - bool | 
| Returns: | string | 
| Description: | Returns a string containing the addAttr command which would be required to recreate the attribute. The command includes the terminating semicolon and is formatted as if for use with a selected node, meaning that it contains no node name. If longFlags is True then the long flag names will be used, otherwise their short names will be used. | 
| def OpenMaya.MFnAttribute.hasCategory | ( | ) | 
Checks to see if the attribute has a given category
| def OpenMaya.MFnAttribute.setNiceNameOverride | ( | ) | 
Sets a nice UI name for this attribute rather than using the default derived from it's long name.
| 
 | static | 
| Name: | kDelete | 
| Type: | int | 
| Description: | Delete array element (array attributes only). | 
| 
 | static | 
| Name: | kNothing | 
| Type: | int | 
| Description: | Do nothing to the attribute's value. | 
| 
 | static | 
| Name: | kReset | 
| Type: | int | 
| Description: | Reset the attribute to its default. | 
| 
 | static | 
Does the attribute affect how the node is drawn in Maya's viewport?
| Name: | affectsAppearance | 
| Type: | bool | 
| Access: | RW | 
| Description: | Does attr affect appearance of object when rendered in the viewport? | 
| 
 | static | 
Does the attribute affect the node's worldSpace matrix?
| Name: | affectsWorldSpace | 
| Type: | bool | 
| Access: | RW | 
| Description: | DAG nodes only. Does the attr affect the node's world-space state? | 
| 
 | static | 
Is the attribute an array?
| Name: | array | 
| Type: | bool | 
| Access: | RW | 
| Description: | Is attr an array? | 
| 
 | static | 
Should the attribute's value be cached in the datablock?
| Name: | cached | 
| Type: | bool | 
| Access: | RW | 
| Description: | Should attr value be cached in the datablock? | 
| 
 | static | 
Should the attribute be displayed in the Channel Box?
| Name: | channelBox | 
| Type: | bool | 
| Access: | RW | 
| Description: | Should attr appear in Channel Box? | 
| 
 | static | 
Can connections be made to the attribute?
| Name: | connectable | 
| Type: | bool | 
| Access: | RW | 
| Description: | Is attr connectable? | 
| 
 | static | 
What should happen when the attribute loses an incoming connection?
| Name: | disconnectBehavior | 
| Type: | Disconnect Behaviour constant | 
| Access: | RW | 
| Description: | What should happen when attr loses an incoming connection? | 
| 
 | static | 
Is the attribute a dynamic attribute?
| Name: | dynamic | 
| Type: | bool | 
| Access: | R | 
| Description: | Is it a dynamic attr? | 
| 
 | static | 
Is the attribute an extension attribute?
| Name: | extension | 
| Type: | bool | 
| Access: | R | 
| Description: | Is it an extension attr? | 
| 
 | static | 
If True the attribute will not be displayed in the Attribute Editor.
| Name: | hidden | 
| Type: | bool | 
| Access: | RW | 
| Description: | If True attr will not be displayed in the Attribute Editor. | 
| 
 | static | 
Hint to DG that this attribute may not always be used when computing the attributes which are dependent upon it.
| Name: | indeterminant | 
| Type: | bool | 
| Access: | RW | 
| Description: | Hint to DG that this attr may not always be used when computing the attrs which are dependent upon it. | 
| 
 | static | 
If False, connectAttr -nextAvailable can be used with this attribute. If True then an explicit index must be provided.
| Name: | indexMatters | 
| Type: | bool | 
| Access: | RW | 
| Description: | If False, connectAttr -nextAvailable can be used with this attr. If True then an explicit index must be provided. | 
| 
 | static | 
Will the node handle the attribute's data storage itself, outside of the node's data block?
| Name: | internal | 
| Type: | bool | 
| Access: | RW | 
| Description: | Will the node handle the attr's data storage itself, outside of the node's data block? | 
| 
 | static | 
Does the attribute is a proxy attribute?
| 
 | static | 
Can keys be set on the attribute?
| Name: | keyable | 
| Type: | bool | 
| Access: | RW | 
| Description: | Can keys be set on attr? | 
| 
 | static | 
Attribute's long name.
| Name: | name | 
| Type: | string | 
| Access: | R | 
| Description: | Attr's long name. | 
| 
 | static | 
Parent attribute. MObject::kNullObj if attr has no parent.
| Name: | parent | 
| Type: | MObject | 
| Access: | RW | 
| Description: | Parent attr. MObject::kNullObj if attr has no parent. | 
| 
 | static | 
Is the attribute readable?
| Name: | readable | 
| Type: | bool | 
| Access: | RW | 
| Description: | Is attr readable? | 
| 
 | static | 
Is the attribute a render source?
| Name: | renderSource | 
| Type: | bool | 
| Access: | RW | 
| Description: | Is attr a render source? | 
| 
 | static | 
Attribute's short name.
| Name: | shortName | 
| Type: | string | 
| Access: | R | 
| Description: | Attr's short name. | 
| 
 | static | 
Should the attribute's value be preserved when the node is written to file?
| Name: | storable | 
| Type: | bool | 
| Access: | RW | 
| Description: | Should attr value be stored when written to file? | 
| 
 | static | 
Should the attribute be treated as a color in the UI?
| Name: | usedAsColor | 
| Type: | bool | 
| Access: | RW | 
| Description: | Should attr be treated as a color in the UI? | 
| 
 | static | 
Should the attribute be treated as a file name in the UI?
| Name: | usedAsFilename | 
| Type: | bool | 
| Access: | RW | 
| Description: | Should attr be treated as a filename in the UI? | 
| 
 | static | 
Array attributes only: does the attribute create elements using MArrayDataBuilder?
| Name: | usesArrayDataBuilder | 
| Type: | bool | 
| Access: | RW | 
| Description: | Array attrs only. Does attr create elements using MArrayDataBuilder? | 
| 
 | static | 
DAG nodes only: if the node is instanced, will the attribute have separate values for each instance?
| Name: | worldSpace | 
| Type: | bool | 
| Access: | RW | 
| Description: | DAG nodes only. If the node is instanced, will the attr have separate values for each instance? | 
| 
 | static | 
Is the attribute writable?
| Name: | writable | 
| Type: | bool | 
| Access: | RW | 
| Description: | Is attr writable? |