Python API 2.0 Reference
|
Public Member Functions | |
def | __init__ () |
def | addChild () |
def | child () |
def | create () |
def | getAddAttrCmds () |
def | numChildren () |
def | removeChild () |
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__ () |
Additional Inherited Members | |
Static Public Attributes inherited from OpenMaya.MFnAttribute | |
int | kDelete = 0 |
int | kNothing = 2 |
int | kReset = 1 |
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(...) | |
Functionset for creating and working with compound attributes. Method resolution order: - MFnCompoundAttribute - MFnAttribute - MFnBase - builtins.object
MFnAttribute<h2>Constructors
Signature | Parameters | Description |
---|---|---|
MFnCompoundAttribute() | Default constructor. Returns a new MFnCompoundAttribute function set with no Maya object attached. | |
MFnCompoundAttribute(object) | object - MObject | Returns a new MFnCompoundAttribute function set, attached to the specified Maya object. |
def OpenMaya.MFnCompoundAttribute.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
|
static |
Create and return a new object. See help(type) for accurate signature.
OpenMaya.MFnCompoundAttribute.addChild | ( | ) |
Add a child attribute.
Signature: | addChild(child) |
Parameters: | child - MObject |
Returns: | Reference to self. |
Description: | Add a child attribute. |
OpenMaya.MFnCompoundAttribute.child | ( | ) |
Returns one of the attribute's children, specified by index.
Signature: | child(index) |
Parameters: | index - int |
Returns: | MObject |
Description: | Returns the index'th child attribute of this compound. |
OpenMaya.MFnCompoundAttribute.create | ( | ) |
Creates a new compound attribute, attaches it to the function set and returns it as an MObject.
Signature: | create(longName, shortName) |
Parameters: | longName - string shortName - string |
Returns: | MObject |
Description: | Create a new compound attribute with the given longName and shortName, attach it to the function set and return it in an MObject. |
OpenMaya.MFnCompoundAttribute.getAddAttrCmds | ( | ) |
Returns a list of MEL 'addAttr' commands capable of recreating the attribute and all of its children.
Signature: | getAddAttrCmds(longNames=False) |
Parameters: | longNames - bool |
Returns: | list of strings |
Description: | Returns a list of strings containing the addAttr commands necessary to recreate the compound attribute and all of its children. The attributes are returned in depth-first order, meaning that element 0 of the array will contain this attribute's addAttr command, element 1 will contain the command for its first child, element 2 will contain the command for its first child's child, if one exists, and so on. Each command is returned with the terminating semicolon and is formatted as if for use with a selected node, meaning that no node name is supplied. |
OpenMaya.MFnCompoundAttribute.numChildren | ( | ) |
Returns number of child attributes currently parented under the compound attribute.
Signature: | numChildren() |
Parameters: | |
Returns: | int |
Description: | Returns number of child attributes currently parented under this compound attribute. |
OpenMaya.MFnCompoundAttribute.removeChild | ( | ) |
Remove a child attribute.
Signature: | removeChild(child) |
Parameters: | child - MObject |
Returns: | Reference to self. |
Description: | Remove a child attribute. |