Dynamic loading of user prefs

I am sick of sitting down at other users machines and not having all of my hotkeys.

Is it possible to have Maya load up new user prefs without a restart? That way I could put everyone's prefs on the network and run a script to load them up in a convient way as users move from machine to machine. Kind of like a pseudo-"log-in" kind of thing.

What do you think?

--JeffD

You can source userHotkeys.mel in the script editor and it seems to load all the hotkeys. For some reason I can't do it from a command, but I i would think it's possible.

Yeah, I actually tried sourcing my userHotkeys.mel, but I got back an error that said it couldn't find it.

I figured that this was because userHotkeys.mel doesn't actually contain a proc in it. Though that does give me an idea on maybe just bracketing those same commands within a proc that I can call. That might work.

--JeffD

I got this to work with a command. Try sourcing the full path to the userHotkey file. Put the full path in quotes. I was able to switch between a couple of different sets of hotkeys like this. I think sourcing the file executes all the lines outside of procedures.

Hmm there was a mel switch (i remember clearly since i saw this yesterday, but now i dont remember anybore) for a mel command that reloaded the user hotkeys, while i have no idea what it actuly does thats what maya documents said it would do...

and by the way how on earth do i map keys like

hotkey -sourceUserHotkeys;

is probably the command you're looking for. I was trying to write a script that could dynamically create, and switch between different hotkey sets. unfortunately maya doesn't have a file copy command, and I couldn't find a way around not using copy commands...