pymel.core.windows.hotBox

hotBox(*args, **kwargs)

This command controls parameters related to the hotBox menubar palette. When the command is invoked with no flags, the hotBox is popped up. In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
PaneOnlyMenus (po) bool ../../../_images/create.gif
 
Sets a row of menus to be the only visible row.
PaneToggleMenus (pt) bool ../../../_images/create.gif ../../../_images/query.gif
 
Sets the visibilty of a row of menus to on or off.
animationOnlyMenus (ao) bool ../../../_images/create.gif ../../../_images/query.gif
   
animationToggleMenus (at) bool ../../../_images/create.gif ../../../_images/query.gif
   
clothOnlyMenus (clo) bool ../../../_images/create.gif ../../../_images/query.gif
   
clothToggleMenus (clt) bool ../../../_images/create.gif ../../../_images/query.gif
   
commonOnlyMenus (co) bool ../../../_images/create.gif ../../../_images/query.gif
   
commonToggleMenus (ct) bool ../../../_images/create.gif ../../../_images/query.gif
   
customMenuSetsToggleMenus (cst) bool ../../../_images/create.gif ../../../_images/query.gif
   
displayCenterOnly (dco) bool ../../../_images/create.gif
 

Three different display styles are defined for the hotBox. It can be fully displayed (dh), display only the marking menu zones (dzo) or no display (dco) which means that the entire screen can be used to access the marking menus defined in the center zone.

displayHotbox (dh) bool ../../../_images/create.gif ../../../_images/query.gif
   
displayStyle (ds) bool ../../../_images/query.gif
 

Returns a string that identifies the flag used to set the current display style. The results can be dh, dzo, or dco, depending on which style the hotBox is using at the moment.

displayZonesOnly (dzo) bool ../../../_images/create.gif ../../../_images/query.gif
   
dynamicsOnlyMenus (do) bool ../../../_images/create.gif ../../../_images/query.gif
   
dynamicsToggleMenus (dt) bool ../../../_images/create.gif ../../../_images/query.gif
   
liveOnlyMenus (lo) bool ../../../_images/create.gif ../../../_images/query.gif
   
liveToggleMenus (lt) bool ../../../_images/create.gif ../../../_images/query.gif
   
menuSetOnly (mso) unicode  
   
menuSetToggle (mst) unicode, bool  
   
noClickCommand (ncc) script ../../../_images/create.gif
 
The command to be executed if the hotBox is engaged and then disengaged within noClickDelay time units.
noClickDelay (ncd) float ../../../_images/create.gif
 

If the hotBox is engaged and then disengaged within this time interval, then the noClickCommand is executed. The time interval is in seconds. The default value is 0.1.

noClickPosition (ncp) bool ../../../_images/create.gif
 

If a -noClickCommand has been specified then this flag will cause the X and Y screen coordinates of the mouse pointer to be appended as arguments to that command. The coordinates used are those of the pointer at the time when the hotbox command was initiated.

noKeyPress (nkp) bool ../../../_images/create.gif ../../../_images/query.gif
 

Normally the hotbox is popped by a pressing a keyboard key. Use the nkpflag to pop the hotbox from a device other than the keyboard (still use the rlflag to unpop the hotbox).

polygonsOnlyMenus (plo) bool ../../../_images/create.gif ../../../_images/query.gif
   
polygonsToggleMenus (plt) bool ../../../_images/create.gif ../../../_images/query.gif
   
position (pos) int, int ../../../_images/create.gif
 

Specify the screen position the hotbox should be centered at next time it is displayed. The default is the cursor position.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

release (rl) bool ../../../_images/create.gif ../../../_images/query.gif
 
Action to be called on the release of the key which invoked the hotbox
renderingOnlyMenus (ro) bool ../../../_images/create.gif ../../../_images/query.gif
   
renderingToggleMenus (rt) bool ../../../_images/create.gif ../../../_images/query.gif
   
rmbPopups (rmb) bool ../../../_images/create.gif ../../../_images/query.gif
 
Enables/Disables a popup menu of the current function set. This popup menu appear when the right mouse button is pressed in the center zone of the hotbox.
showAllToggleMenus (a) bool ../../../_images/create.gif ../../../_images/query.gif
 
Sets the visibility of all menus to on or off. When queried, will only return true if all menu rows are visible.
surfacesOnlyMenus (so) bool ../../../_images/create.gif ../../../_images/query.gif
   
surfacesToggleMenus (st) bool ../../../_images/create.gif ../../../_images/query.gif
   
transparenyLevel (tr) int ../../../_images/create.gif ../../../_images/query.gif
 

The percentage of transparency, from 0 to 100. Currently, only the values 0, 25, 50, 75 and 100 are supported. Any other values will be rounded off to the nearest supported value.

updateMenus (um) bool ../../../_images/create.gif
 
Reloads the hotBox menus from the main menubar. This flag is used when the menus in the main menubar are modified, and the hotBox menus need to be refreshed.

Derived from mel command maya.cmds.hotBox

Example:

import pymel.core as pm

# Bind the hotBox to the spacebar.
#
pm.nameCommand( 'NameComPop_hotBox', annotation='Pop Hotbox', command='hotBox' )
# Result: u'NameComPop_hotBox' #
pm.hotkey( k=' ', name='NameComPop_hotBox' )

# Give the hotBox a 'noClickCommand' which displays the screen position at
# which the hotBox was requested. Note that 'showPos' function is passed
# to the 'noClickCommand' flag as a function, not as a string. This is necessary
# to allow Maya to pass the coordinates to it properly.
#
def showPos(x, y):
    print("hotBox requested at (%d, %d)" % (x, y))

pm.hotBox(noClickCommand=showPos, noClickPosition=True)

Previous topic

pymel.core.windows.horizontalLayout

Next topic

pymel.core.windows.hotkey

Core

Core Modules

Other Modules

This Page