Home  Previous Next

Tips for programming in MG-Picker Studio :

lightbulb Frequently visited commands be made into the 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 the right-clicking menu of the picker panels. This 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 the panel, drag left and release to return to the main panel, drag the right switch to the body panel, drag up to switch to the fingers panel, and down to switch to the facial panel.

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

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

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

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

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

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

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

lightbulb To support your own functionality, you may need some scripts to 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