Create a button in UI for each mode an add Maya shortcuts to switch easily.
First version (commit "Up: use different buttons to set modes" - ba5da74 ) :
On initialisation of the plugin : create command and associate a hotkey to it.
If command already exists, modify it to set the MVG commands.
On uninitialisation of the plugin : set the command to "".
Commands still exists, but are don't do anything.
Pb : The shortcuts are used all the time, even when the plugin is unload.
Second version (commit "Up: remove commands and hotkeys when plugin is unloaded" -
80c7100):
On initialisation : create commands and shortcuts
On uninitialisation : Save shorcuts in optionVar. Remove commands and shorcuts.
Pb: when we quit Maya, the deletion of the commands and shortcuts doesn't work as expected. RunTimeCommands are not removed.
Create a button in UI for each mode an add Maya shortcuts to switch easily.
First version (commit "Up: use different buttons to set modes" - ba5da74 ) :
Second version (commit "Up: remove commands and hotkeys when plugin is unloaded" - 80c7100):