- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Is it just me or the hotkey manager is a nightmare? It should be so simple... Whatever.
I'd like to load dynamically hotkeys through MEL at startup, so that they are shared with all my co-workers, regardless of maya's version, even if the "prefs" folder has been removed.
I'd like to import hotkeys at startup from a shared folder (versioned on GIT).
I've looked around if i could find out a solution (first of all, of course, in Maya documentation), but each time I thought I had the solution, it was a failure...
I've tried many mays without any result.
e.g.
- write the userNamedCommands.mel and userRunTimeCommands.mel files in prefs/ at startup
- writing userHotKeys_[setName].mel and[setName].mhk in prefs/hotkey/ at startup
- load the hotkeySet
- write again mel files when quitting Maya
But it doesn't work and I couldn't find the right way.
It doesn't work even if i load manually the .mhk file in the hotkey editor. That how it looks like (with just one hotkey):
//runTimeCommand runTimeCommand -annotation "F4_UseFlatLights" -category "F4" -hotkeyCtx "" -commandLanguage "mel" -command ("JPL_DisplayUseFlatLight ();") F4_UseFlatLights; //nameCommand nameCommand -annotation "F4_UseFlatLightsNameCommand" -sourceType "mel" -command ("F4_UseFlatLights") F4_UseFlatLightsNameCommand; //hotkey hotkey -keyShortcut "0" -name ("F4_UseFlatLightsNameCommand");
I've got to admit that i don't really understand the mysterious mechanism of Maya's hotkeys managing...
What would be the wright way to dynamically load hotkeys? I think i don't need an actuel code but just the logical process.
I would reeeally appreciate a help on that...
Thanks
Solved! Go to Solution.