Hi there,
We are just getting Deadline going here, and I’m curious to find out how to set System environment variables on a per job basis for Maya renders.
Our machines here are set to ask the User for the location of “MAYA_APP_DIR” so that everyone can load or switch up settings fairly easily. On one hand its a pain, but on the other hand…its pretty cool , because you can start setting up Custom Settings/Shaders/Scripts per project relatively easily.
So, typically and most importantly I need to be able to set all render slaves to look at a central location where MentalRay Custom Shaders are stored, as well as various scripts etc.
I know I can set up a Maya.env file, but that would need to be done on each individual machine…
not cool…
Please tell me this is a simple task
Net use f: \142.xxx.xxx.xx.xxx /user:me
SET MAYA_APP_DIR = F:\maya
SET MI_CUSTOM_SHADER_PATH = F:\maya\MENTALRAY_CUSTOM\lib;F:\maya\MENTALRAY_CUSTOM\include;
Thanks!
ps…Deadline is pretty sweet!
This should be possible, and should actually be pretty easy to set up in Deadline 5.2, which was just released yesterday.
thinkboxsoftware.com/deadline-downloads/
This version introduces some new script functions that allow you to set environment variables for the rendering process only, without affecting the Slave’s or the machine’s environment. You can use this function in the PreLoad.py script, which you can drop in to your MayaCmd and/or MayaBatch plugin folders in \your\repository\plugins. Here is some more info on the PreLoad.py script:
thinkboxsoftware.com/deadlin … -_Optional
Note that the example there sets environment variables for the Slave, which means every job that slave runs will inherit those variables. That might not be ideal. This example will only set them for the rendering process.:
def __main__( *args ):
customMayaApp = ... #TODO: how do you plan on getting the folder to use?
customShaderPath = ... #TODO: how do you plan on getting the folder to use?
LogInfo( "Setting MAYA_APP_DIR to " + customMayaApp )
SetProcessEnvironmentVariable( "MAYA_APP_DIR", customMayaApp )
LogInfo( "Setting MI_CUSTOM_SHADER_PATH to " + customShaderPath )
SetProcessEnvironmentVariable( MI_CUSTOM_SHADER_PATH, customShaderPath )
Now the last part is determining which paths to use. Did you have any ideas on how you were going to do that? There are probably a few options. I guess the first question would be if you are using a custom submission script, because if you were, you could store them in the plugin info file, and then extract them in the PreLoad.py file using the GetPluginInfoEntry functions.
Cheers,
WOW…are you kidding me!!!
sorry, its just a bit funny…
our IT guy just came and installed Deadline yesterday, but it was v.5.1 booo…
but yaaayyy for the added functionality
I’ll take a look,
“I guess the first question would be if you are using a custom submission script, because if you were, you could store them in the plugin info file, and then extract them in the PreLoad.py file using the GetPluginInfoEntry functions.”
I’m using default Deadline. and the submission script that came with 5.1
hmmm…I’m guessing it would be a total custom job for this sort of thing.
but it would be cool if there was a way of putting the MAYA_APP_DIR and all settings right in the repository…
and as a default option in Deadline. (though I dont know why that wouldn’t be a good idea from Thinkbox’s perspective).
Thanks
Russell!
I’ll be back