pymel.core.windows.attrControlGrp

attrControlGrp(*args, **kwargs)

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.

Flags:

Long Name / Short Name Argument Types Properties
annotation / ann unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets or queries the annotation value of the control group.
attribute / a PyNode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets or queries the change command of the control group. The change command will be executed when the control is used to change the value of the attribute.
enable / en bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets or queries the enable state of the control group. The control is dimmed if the enable state is set to false.
handlesAttribute / ha PyNode ../../../_images/query.gif ../../../_images/edit.gif
  Returns true or false as to whether this command can create a control for the specified attribute.
hideMapButton / hmb bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Force the map button to remain hidden for this control.
label / l unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets or queries the label of the control group.
preventOverride / po bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Sets or queries the prevent adjustment state of the control group. If true, the RMB menu for the control will not allow adjustments to be made. Flag can have multiple arguments, passed either as a tuple or a list.

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