Go to: Synopsis. Return value. Related. Flags. Python examples.
hotkeyCtx([addClient=string], [clientArray=boolean], [currentClient=string], [insertTypeAt=[string, string]], [removeAllClients=boolean], [removeClient=string], [removeType=string], [type=string], [typeArray=boolean], [typeExists=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
hotkeyCtx is undoable, queryable, and NOT editable.
This command sets the hotkey context for the entire application.
None
In query mode, return type is based on queried flag.
hotkey, hotkeySet
addClient, clientArray, currentClient, insertTypeAt, removeAllClients, removeClient, removeType, type, typeArray, typeExists
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
# Here are some examples of how to use hotkeyCtx command.
#
# Create a new context type
cmds.hotkeyCtx( insertTypeAt=('Global', 'CustomEditor') )
cmds.hotkeyCtx( ita=('CustomEditor', 'CustomTool') )
# Query all existing context types
ctxTypes = cmds.hotkeyCtx( typeArray=True, query=True )
print str(ctxTypes)
# Remove an existing context type
cmds.hotkeyCtx( removeType='CustomTool' )
# Determine if the given context type exists.
cmds.hotkeyCtx( te='CustomTool', query=True )
# Associate the clients to the specific context type.
cmds.hotkeyCtx( t='CustomEditor', ac=['hyperGraphPanel', 'outlinerPanel'] )
# Set current context
cmds.hotkeyCtx( t='CustomEditor', cc='hyperGraphPanel' )
# Unassign the client from the specific context type.
cmds.hotkeyCtx( t='CustomEditor', rc='outlinerPanel' )
# Query all associated clients for the given context type.
cl = cmds.hotkeyCtx( t='CustomEditor', ca=True, query=True )
print str(cl)
# Remove all associated clients
cmds.hotkeyCtx( t='CustomEditor', rac=True )