Go to: Synopsis. Return value. Flags. Python examples.
disable(
[string]
, [value=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
disable is undoable, NOT queryable, and NOT editable.
This command enables or disables the control passed as argument.None
Long name (short name) | Argument types | Properties | ||
---|---|---|---|---|
value(v)
|
boolean
|
|||
|
Flag can appear in Create mode of command | Flag can appear in Edit mode of command |
Flag can appear in Query mode of command | Flag can have multiple arguments, passed either as a tuple or a list. |
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