in Installation by

We have multiple users of the MGPicker Animator and 2 users of MGPicker Editor. Our end users do not have admin on their machines.

Rather than manually install MGPicker on each machine by following these instructions is there a way you recommend to automate the process?

I tried creating a package that copied the files to the ~/Library/Preferences/Autodesk/maya/2020/scripts folder, but it seems I am missing the step to initialize/load MGPicker, because it does not appear as a window when I launch Maya.

I tried the above with both the “copy to users scripts folder” and “no copy” installation methods.

I also tried installing the .pkg from the Autodesk App Store, but that one will not load in Maya either.

Thanks in advance for any help you can provide.

1 Answer

0 votes
by

Suggestion on the deployment:

  • Unzip the installation package you downloaded to a place that is accessible to the user  / all user, it could be in server, or local user machine, it is also ok to be in the user Maya script folder.
  • You can choose to only extract the MG-PickerStudio folder inside of the zip package or all of them.
  • In Maya, create a MEL shelf button with the code below by copying code to the script editor MEL tab, select them and MMB drag to shelf tab:
string $mgpicker_programDir = `getenv "MGPICKER_PROGRAM_FILE_DIR"`;
if(`filetest -d $mgpicker_programDir`)
{
    eval ("source \""+$mgpicker_programDir+"/MGPicker_WrittenByMiguel.mel"+"\"");
}
else 
{ 
    eval ("source \"/path/to/your/MG-PickerStudio/MGPicker_Program/MGPicker_WrittenByMiguel.mel\"");
}
MG_PickerStudio 1;
  • This is code to launch MG-Picker Studio in animator mode. To launch in designer mode, just change the last line to MG_PickerStudio 0;
  • As you can see, if you got a chance to set the env MGPICKER_PROGRAM_FILE_DIR with the path to MGPicker_Program, you can simplify the code to :
string $mgpicker_programDir = `getenv "MGPICKER_PROGRAM_FILE_DIR"`;
if(`filetest -d $mgpicker_programDir`)
{
    eval ("source \""+$mgpicker_programDir+"/MGPicker_WrittenByMiguel.mel"+"\"");
    MG_PickerStudio 1;
}
else 
{ 
    error ("Error finding MG-PickerStudio from env MGPICKER_PROGRAM_FILE_DIR");
}
  • The equivalent python code will also work.
  • For the animator mode icon, it is /path/to/MGPicker_Program/Icons/Colored/Picker_animModeIcon.png, for designer mode it is  /path/to/MGPicker_Program/Icons/Colored/Picker_designerModeIcon.png
  • It is also possible to automate the process of shelf button creation, by using Maya shelfButton command, feel free to let me know if you need further help on this.
  • In future, if there is a newer version, you can simply re-download the package, unzip and override the data.
by
Defining the `MGPICKER_PROGRAM_FILE_DIR` env variable is very suggested if it is easy to do in your production env.

Since MG-Picker Studio uses Maya workspace control to launch itself, the issue is even if there is a new MG-Picker Studio version, on the user's Maya it might still launch the old version as the workspace control remembers codes which includes the hard-coded path.

If you define the MGPICKER_PROGRAM_FILE_DIR env variable, you are free from such an issue.

Categories

...