Home  Previous Next

Tips for the programming in MG-Picker Studio :

lightbulb Frequently visited commands be made into command button, and parent them to the picker panel.

lightbulb For the viewport manipulation, such as pan & zoom to frame a certain picker panel, you make the command into right clicking menu of the picker panels.

Which means, you attach the same marking menu to all the picker panels.

For panel switching code:

MGPickerView -activePanelIndex 2;                //2 is the panel index

Now animator could right click on any free space of panel, drag left and release to return to main panel, drag right switch to body panel,

drag up to switch to fingers panel, down to switch to facial panel.

Animator could still use 0~3 hotkey for panel switching for sure, but using marking menu is a bit more intuitive way.

If you keep all the panel design adopt the same marking menu, animator could switch to a certain panel even without thinking.

lightbulb To get current picker item that a command belong to, use  command:

string $currentItem = `MGPicker -q -currentItem`;

//after this you could use $currentItem to call the MGPickerItem command.

lightbulb To get attribute of the attribute-button, use command:

string $attr = `MGPicker -q -currentAttributeName`;

lightbulb To support your own functionality, you may need some scripts be auto-sourced when MG-Picker Studio loads.

put these scripts, including mel / python scripts, into the folder: Maya's user script folder/MG-PickerStudio/MGPicker_UserConfig/AutoSourced.

The mel scripts within the folder will be auto-sourced, while python scripts will be imported by the function call: execfile().

 

 

Home Previous Next