Home Website Youtube GitHub

List of mGear environment variables?

Examples:

MGEAR_SHIFTER_CUSTOMSTEP_PATH=
MGEAR_SHIFTER_COMPONENT_PATH=

I tried to look in the docs but I can only seem to find these occasionally mentioned on release notes when a new one is added. Is there a place were I can find a list of all these variables?

Thanks!

PS: I’m trying to add one to point to a default folder when I click on “Export Skin Pack”

I don’t know. But if you search the code base for os.environ.get you’ll see a list of everytime mGear queries your environment variables. (There might be more, if there are different syntaxes for querying it. But that is one way of querying environment variables from Python.)

From there, you can copy the way that it uses it. You can create any environment variable you want in your Maya.env file. And then in your code, add it.

  1. Add MY_CUSTOM_SKIN_PATH to Maya.env
  2. Find the command that opens the browse skin dialog window.
  3. Inject your os.environ.get(“MY_CUSTOM_SKIN_PATH”) there, into the default directory flag.

And yeah, there are a few places in mGear where I wish the dialog window would at least remember where you last browsed to. skinPacks, skinFiles, picker files, lips_rigger and eyes_rigger files. There might be more.

1 Like