r4 - 10 Dec 2007 - 01:04:54 - MattEstelaYou are here: TWiki >  Maya Web > MayaUserInterface

User interface, hotkeys and shelf buttons

Constantly resetting scene fps... a fix!

A fix vs a feature that should be more clearly documented... you decide. Last few versions of maya had an annoying habit of returning to 24fps, regardless of what your preferences were set to. Someone on the highend3d list pointed out an option box next to the file->new scene option, which I swear wasn't there before. Anyways, look at it, and there's where you set your new scene fps.

You know what? I've changed my mind; you don't get to decide, I do, and I decide its stupid. If its a scene option, fine, then take it out of preferences. Conversely, if its a preference, remove it from the new scene options. One or the other autodesk, not both.

Restore old zoom behavior in hypershade

Copy hyperShadePanel.mel to your local scripts directory, then change each line that starts

-scrollUpDownNoZoom true


-scrollUpDownNoZoom false

Shelf button to open an explorer window on your current project

Windows only, if you're smart enough to run linux then you're smart enough to figure this out yourself.. smile

system("load " + `workspace -q -rd`)

Hotkeys everywhere

Been looking for a program (under windows) to let me bind stuff to the media keys (the play/pause, email, browser etc keys that sit on the fancier keyboards). Most keyboard drivers offer limited support for this, but if your keyboard doesn't ship with custom drivers, or you need something more complex, your outta luck.

Until now that is! AutoHotKey lets you bind anything to anything, with almost no overhead. At the moment I have those keys controlling itunes, but I'm sure I'll work out things for maya soon enough. It also lets you bind controls to joystick buttons, has a fairly comprehensive scripting language, and its free free free.

Autohotkey: http://www.autohotkey.com/ Joystick mapping: http://www.cartoonmonkey.com/CE_techrant.html

Not sure what linux or OSX guys do... xmodmap or something right? Bah, sounds too much like hard work.

Context sensitive hotkeys (making Maya smarter)

An if statement in a hotkey definition is a powerfull thing. It allows your hotkey definition to work a certain way depending on particular conditions. For example, you can create a context sensitive hotkey that will show all lighting in the viewport if no lights are selected, but if lights are selected only show selected lighting in the scene. If you configure your hotkey (default 7) in this way you've just merged two potential hotkeys into one hotkey, and that's faster workflow. Another example is you could use the Enter key as a hotkey for looking through particular objects such as cameras or lights, but only if a camera or light is selected. There are tons of places this can be useful. Marking menu keys that know whether you're in Object Select Mode or Component Select Mode and display the proper marking menu accordingly. The ability to use a single hotkey for multiple similar events is good use of maya's interface features. Here is an example script to change the 7 (show lighting) hotkey to be context sensitive. It will show lighting in the viewport on selected lights, if no lights are selected it shows all lights:

  string $selLights[] = `ls -sl -dag -type light`; 
  string $currentPanel = `getPanel -withFocus`; 
  string $panelType = `getPanel -to $currentPanel`;
  if ($panelType ==  "modelPanel") { 
       if(size($selLights) > 0) 
         modelEditor -edit -dl "selected" $currentPanel; 
         modelEditor -edit -dl "all" $currentPanel; 
  else if (`isTrue "MayaCreatorExists"` && 
           `scriptedPanel -ex $currentPanel` && 
         `scriptedPanel -q -type $currentPanel` == "dynPaintScriptedPanelType") { 
   if(size($selLights) > 0) 
      dynPaintEditor -e -dtx 1 -dsl "selected" $gDynPaintEditorName; 
      dynPaintEditor -e -dtx 1 -dsl "all" $gDynPaintEditorName; 

-- SeanFennell? - 6 Oct 2005

Snap hotkeys temporary or permanent

Somewhat like softimage tap vs hold behavior. Shift-x will temporarily enable snap to grid, but if you release shift before the x-key, then the snap mode will be permanent. Takes getting used to, I think of it as rolling your hand in and out of the key combo.

Toggle toolbars

Accidentally discovered by James Studdart... "ctrl-space" will toggle all toolbars, switching from your regular viewport to a really maximised viewport. Pretty handy!

It should be noted that "ctrl-space" only toggles between all UI Elements visible, and none. If one has customized their UI Elements (such as a hiding the Toolbox or Help Line), "ctrl-space" will not return to this customization. To return to a customized UI, map a hotkey such as "ctrl-alt-space" to "Restore UI Elements".


Maya's snap tools can work a little erratically, here's a few things to try and make them behave:

  • Make sure your transform tool is set to worldspace (double-click the transform icon to bring up the options)
  • Make sure you've not limited the transform tool to work in one axis only. It'll be highlighted it yellow and the center of the tool will be a square perpendicular to the limited axis. Control-click on the square so that its flat to camera
  • I find snapping with the middle mouse button rather than the left mouse button makes it work more consistently. A lmb drag will try to similtaneously position the object under the cursor, as well as complete the snap options you have, but the cursor position seems to have priority. Using a mmb drag seems to switch maya's priority, so the snapping options come first.
  • If it just won't snap, try rotating your camera elsewhere and try again.
  • Use hide or isolate select so you only have the thing you're trying to snap to (snapp-er?), and the object your snapping (snap-ee?) on screen.

Look through selected camera

You have the usual 'panel->look through selected', but I end up using this so often I have this bound to my 'l' hotkey. The command it runs is

lookThru `ls -sl`

Alternatively, you can middle-mouse drag cameras or lights directly from the outliner to a viewport, nice if you're as lazy as I am and can't even be bothered to reach the 'l' key. Its all the way over the other side of the keyboard...

Another handy timesaver is you don't have to select the camera directly. If its buried under 45 nested groups, you just have to drag the top group to a viewport, or hit 'l' while that group is selected, and maya will switch to the first camera it finds in that heirachy.

Hotkey to toggle visibility

Here is a hide/show switch I assigned to "h". Wasn't handy enough with default Maya display tools. Objects from the selection will be hidden or shown function to their current status.
string $selection[] = `ls -sl`;
for($object in $selection) {
   if(`getAttr ($object + ".visibility")` == 0) {
      setAttr ($object + ".visibility") 1;
   } else {
      setAttr ($object + ".visibility") 0;
-- NicolasdHaussy? - 11 Mar 2005

Hotkey to toggle isolate select

I have this bound to shift-i, and I stuck it in the miscellaneous category in the hotkeys.
   string $panel = `getPanel -withFocus`;
   string $panelType = `getPanel -to $panel`;
   if ($panelType ==  "modelPanel") {
      if (size(`ls -sl`) > 0) {
         enableIsolateSelect $panel true;
      } else {
         enableIsolateSelect $panel false;
or this one, done by David Stripinis... little neater than mine.
$panel = `getPanel -withFocus`;
$panelStatus = `modelEditor -q -viewSelected $panel`;
if ( $panelStatus == 0 ) {
   enableIsolateSelect $panel 1;
   isolateSelect -state 1 $panel;
} else {
   enableIsolateSelect $panel 0;
   isolateSelect -state 0 $panel;

if you like to have newly created objects added to your isolated view as you work (eg, new curves) add the following (saves having to check it on in your views) Note that it doesn't work under linux for some stupid reason.:

isoSelectAutoAddNewObjs $panel 1;

Hotkey to toggle xray mode

I bound this to x, you might want to use shift-x instead...
if (`getPanel -to (eval("getPanel -withFocus"))`) { 
    $currentPanel = `getPanel -withFocus`; 
    if (`modelEditor -q -xray $currentPanel`) { 
        modelEditor -edit -xray 0 $currentPanel; 
    } else { 
        modelEditor -edit -xray 1 $currentPanel; 

Shelf button to change key display

Drop this as a shelf button, it'll swap the active key display between all keys for the current object, to only values selected in the channel box.

if (`timeControl -q -showKeys $gPlayBackSlider` == "active") {
   timeControl -e -showKeys $gChannelBoxName $gPlayBackSlider;
   print("slider set to show selected channel keys")
} else {
   timeControl -e -showKeys active $gPlayBackSlider;
   print("slider showing all keys")
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback