Hello there,
we just started using Deadline in our studio and I’m still figuring out the best pipeline…
But in the meantime, there is a job right now that needs some custom settings.
Basically, what I want to do is to use global variables in path fields of the submission script just like Maya does it (%l for renderlayer, %s for scenefilename, etc…)
So we just need to change the scene filename to automatically do version incremented renders.
I guess I should set up a CustomSanityChecks.mel file but as I’m not a programmer (just know a bit of Mel and even less of Python) I’m not sure how to do that…
Can I declare environment variables or something like that?
How do I access the selected renderable camera?
thanks for the help
Hi!
The CustomSanityCheck script won’t help in this case. It’s really just meant to check for problems with the scene, and set default values in the submitter when it pops up (it doesn’t run after the user has pressed submit). To support global variables in the submission script fields, you’d have to modify the submitter to do search & replaces after the user presses submit.
You could probably do this in the WriteJobFilesAndSubmit function in \your\repository\submission\Maya\SubmitMayaToDeadline.mel. For example, here is the line that writes the job name to the submission file:
fprint $fileId ( "Name=" + $jobName + "\n" );
You could modify it to look like this (I’m just sudo-coding it because I don’t know the actual functions to get this info):
$jobName = WhateverMayasReplaceFunctionIs( $jobName, "%s", FunctionToGetSceneFileName() );
fprint $fileId ( "Name=" + $jobName + "\n" );
Hope that helps!
Hey rrussell,
Thanks for the help.
I’ve actually made my own global proc inside the submission script.
[code]//########################################################
// LK Global Proc
//########################################################
global proc string LKPathFinder()
{
global string $LKNewRenderingPath;
global string $LKcurrentSceneFile;
global string $LKcurrentSceneFullPath;
global string $LKcurrentScenePath;
string $LKcurrentSceneFullPath = `file -q -sn`;
string $LKcurrentSceneFile = `file -q -sn -shn`;
string $LKregex1 = $LKcurrentSceneFile;
string $LKregex2 = "(Scenes/Project/Lighting)";
string $LKregex3 = ".ma";
string $LKregex4 = ".mb";
$LKcurrentSceneFullPath = `substitute $LKregex1 $LKcurrentSceneFullPath ""`;
string $LKcurrentScenePath = $LKcurrentSceneFullPath;
$LKcurrentScenePath = `substitute $LKregex2 $LKcurrentScenePath "Images/Renders"`;
string $LKversion = $LKcurrentSceneFile;
$LKversion = `substitute $LKregex3 $LKversion ""`;
$LKversion = `substitute $LKregex4 $LKversion ""`;
string $LKNewRenderingPath = $LKcurrentScenePath + $LKversion + "/";
return $LKNewRenderingPath;
};
//########################################################[/code]
Then I’ve just changed $ImageOutputPathGrp to = $LKNewRenderingPath
It’s really specific to our project. Some times that helps ^^
Thx again.