Your Ad Here

Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

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.

Flags

value
Long name (short name) [argument types] Properties
value(v) boolean
If true, this command disables the control. If false, this command enables the control. Default value is true (disable)

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.

Return value

None

Python examples

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

  

Return to Autodesk Index


Your Ad Here