This thread is kind of a continuation of this one.
Basically, I’m trying to find the best way to set environment vars before artists launch their DCC.
I use a list of env var and values, and use a cmd command depending on the os
For instance on windows:
setx ENV_VAR_NAME "value"
before_app_launch.py > Takes too long to launch DCC if we set env var here (slow down from ~5s to several minutes!)
engine_init.py > pretty fast, but SG Desktop launch even if all the env var are nor created yet… Which means that users can launch Maya before plugins env var are setuped on their session. Not good!
- Is there a way to force SGDesktop to wait for a my method to be over before opening the Project Apps pages?
pipeline_configuration_init.py > pretty fast too, but engine does not exists yet, so I can’t set project specific env var.
- Is there a way to query the project name in this class? I would imagine so, as SG Desktop already know which config to initialise.
EDIT: It seems
pipeline_configuration_init.py is also launched a second time once a dcc is launched - so impossible to use it for what I want.