Mixed linux windows farm maya vray env vars

has anyone setup a way of sending a vray job from maya (on windows) to joint windows and linux render machines? I am able to send the job with the windows env vars but these jobs fail on the linux machines as the env vars are different. Is there a way to do a path substitution or a condition that if it is rendering on win or linux it uses a particular set of env vars?
thanks!

Create a jobPreload.py script that sets up the differnt os environments:
https://docs.thinkboxsoftware.com/products/deadline/10.0/1_User%20Manual/manual/application-plugins.html#jobpreload-py

then you can use:

if SystemUtils.IsRunningOnLinux():

and

if SystemUtils.IsRunningOnWindows():

You can then setup the environments for each with:

deadlinePlugin.SetProcessEnvironmentVariable('varible name', 'value')
1 Like

ahh yeah! Just what i was looking for, i’ll have a go at setting this up! thanks Kym!

ok that seems to be working. I wonder if there is a way to then put in a condition to check on the submitted job, vray version? so then i could set env vars for different versions?

I don’t know about Maya, but for 3dsMax, the ‘name’ of the renderer is included in the submitted parameters - with VRay this includes the full version name. If Maya’s submitter doesn’t add this information, you might need to amend your submitter to put this information into one of the Job Extra Info properties. You’ll need to do some string formatting on it to find out the actual version number, but it’s certainly possible.