Accessing Environment Variables in UXP plugin?

Greetings from another VFX/Animation guy! :partying_face:
If you’re not worried about getting your hands dirty with writing some C++ you can write a little custom C++ add-on for your UXP plugin. This allows you to have full access to anything a random process would have access too. I’ve used this mechanism to allow my UXP plugin to run a subprocess (here’s a report on it). In your case the add-on would simply read environment variables (i.e. the equivalent of getenv).

It would definitely be nice if this existed in UXP as a feature. We could have a whitelist of specific variables in the manifest that a script would want to access (same way as allowing specific domains).

1 Like