Possible to launching a shell with specific environment variables via Actions?
0

3 posts in this topic

Hello all,

 

   My goal is to launch programs such as windows shell, Maya & Nuke, etc, from the ftrack UI and also feed custom environment variables to the shell before the application is launched. 

 

   For example, I know project A requires Nuke 8.0 and Ocula 1.0 and project B requires Nuke 9.0 & Ocula 2.0 .

I'm hoping to make/update a UI in ftrack which would have a Nuke icon and if the user double clicks the Nuke icon, the correct version of Nuke and plug-in are found via the environment variables.

    I can do this with other web based production tracking software and via a command line/Gui based system I maintained at a previous job site. This is the first time I've used ftrack so apologies if this is an obvious topic.

 

Thanks for any tips.

 

Adam Chrystie

Pipeline Software Engineer

Share this post


Link to post
Share on other sites

I think I see something which might work..perhaps  in the action method I use python to update the environment variables. I assume for each project I can make a unique set of Action based program Launchers and this is how I can ensure each show gets the right version of software. When we install software we remove any environment info which is global...keeps computers nice and clean and avoids crud from multiple installs interfering with each other...then we use application launchers to add in the needed environment variables before executing the program.

Share this post


Link to post
Share on other sites

Hi:

 

This is something I wish the docs would actually have expanded a lot more on since a lot of my fumbling around the past few months was specifically trying to decide the best way to do this. Initially I had it the same way you're intending, with each ftrack application reading from a specific auth file that sets the environment variables and then launches the application in a subprocess (Connect/3ds max). Right now though I'm abandoning that approach since it's becoming a hassle to manage, and just have a new standalone application for entering credentials. That writes to a global QSettings file instead that is now read and sets the environment variables directly. This way multiple users can still login on the same machine and avoid having to manually set environment variables all the time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0