Go to: Synopsis. Flags. Return value. Python examples.
disable(
[control name]
, [value=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
disable is undoable, queryable, and editable.
This command enables or disables any control.| Long name (short name) | [argument types] | Properties | ||
|---|---|---|---|---|
value(v)
|
boolean
|
|||
|
||||
import maya.cmds as cmds cmds.window() cmds.formLayout() cmds.button( 'fred' ) cmds.showWindow() cmds.disable( 'fred' ) # dims the button cmds.disable( 'fred', v=False ) # un-dims it