OpenMaya.MFnCompoundAttribute Class Reference

OpenMaya.MFnCompoundAttribute Class Reference
+ 本参考页将链接到以下概述主题:

Class Description

Functionset for creating and working with compound attributes.

Method resolution order:
-   MFnCompoundAttribute
-   MFnAttribute
-   MFnBase
-   __builtin__.object

Base Class

MFnAttribute<h2>Constructors

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

 


+ Inheritance diagram for OpenMaya.MFnCompoundAttribute:

Public Member Functions

__init__ ()
 
addChild ()
 
child ()
 
create ()
 
getAddAttrCmds ()
 
numChildren ()
 
removeChild ()
 
- 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 ()
 

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

Constructor & Destructor Documentation

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

Member Function Documentation

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.