Home Technical Talk

Maya Preference/Settings manager

polycounter lvl 6
Offline / Send Message
pointcache polycounter lvl 6
Hello peeps, im transitioning to Maya and having a bit of problems.
What i want to achieve is to be able to switch between hotkey layouts on the fly
according to my needs, if i model (i prefer to have ALL functions on keyboard, i hate pressing UI buttons) i want all my keyboard to be rigged for work as a piano, if i animate same but different hotkeys.
Now the problem is, i don't know and haven't been able to find any fast and convenient way to swap those. Maybe i don't fully understand maya zen, and there is far superior workflow.

(inb4: replacing folders - NO. Thanks, NO. 2014, not 1995)

Replies

  • Bartalon
    Options
    Offline / Send Message
    Bartalon polycounter lvl 12
    This can be done via MEL script but it is highly specific to the hotkeys you want to switch around. The easiest way to do this would probably be to have a few shelf buttons, each with a hotkey configuration for the desired work flow (modeling, animation, UV mapping, etc.) that you can click once to switch between.

    If you copy the script displayed in the Hotkey Editor and paste it into the -command section in the code below, then adjust the other lines to reflect that specific hotkey, you should be able to make your own list of custom hotkeys that can be instantly changed with the click of a button.
    // -ctl for CTRL modifier
    // -alt for ALT modifier, key character is case sensitive
    nameCommand
        -annotation "Centers Pivot Point"
        -command "CenterPivot;"
        CenterPivotNamedCommand;
        hotkey -k "c" -alt -name "CenterPivotNamedCommand";
    
    To unbind a hotkey
    hotkey -k "c" -alt -name ""; 
    
    No restarting or use of menus is required after all the code is in place. Keep in mind that some of these custom namedCommand hotkeys will no longer show up in the Hotkey Editor if queried (but will still work).

    Also note that any quotation mark characters appearing inside of the original -command quotation makes need to be escaped by placing a backslash ( \ ) before each one, like this:
    print "This is how you \"escape\" quotation marks";
    
  • pointcache
    Options
    Offline / Send Message
    pointcache polycounter lvl 6
    Thank you sir, you nailed it. (Still sad no manager script but this will do the job).
  • Brygelsmack
    Options
    Offline / Send Message
    Brygelsmack polycounter lvl 11
    http://www.creativecrash.com/maya/script/mmmmtools
    -Hotkey Manager easily allows users to switch between their own hotkeys, factory default keys, and the MmmmTools keys which are optimized for specific tasks.

    I haven't tried this myself, is it anything like what you're looking for?
  • pointcache
    Options
    Offline / Send Message
    pointcache polycounter lvl 6
    Yes! Can't try it right now but it is it.
Sign In or Register to comment.