This command creates a control of the type most appropriate for the specified attribute, and associates the control with the attribute. Any change to the control will cause a change in the attribute value, and any change to the attribute value will be reflected in the control. Not all attribute types are supported.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
annotation (ann) | unicode | ||
|
|||
attribute (a) | PyNode | ||
Sets or queries the attribute the control represents. The name of the attribute must be fully specified, including the name of the node. Some types of attributes are not supported, but most commonly used attribute types are. |
|||
changeCommand (cc) | script | ||
|
|||
enable (en) | bool | ||
|
|||
handlesAttribute (ha) | PyNode | ||
Returns true or false as to whether this command can create a control for the specified attribute. Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
hideMapButton (hmb) | bool | ||
|
|||
label (l) | unicode | ||
|
|||
preventOverride (po) | bool | ||
|
Derived from mel command maya.cmds.attrControlGrp
Example:
import pymel.core as pm
pm.window()
# Result: ui.Window('window1') #
pm.columnLayout()
# Result: ui.ColumnLayout('window1|columnLayout4') #
pm.attrControlGrp( attribute='defaultResolution.width' )
# Result: ui.AttrControlGrp('window1|columnLayout4|attrFieldSliderGrp1') #
pm.showWindow()