Modifying the sanity check file for After Effects was pretty easy using the example in the documentation and just finding the syntax in the AE submit script. Having a harder time for Maya. How would you script having the default checkbox to Submit Maya Scene File or even Strict Error Checking on? Is there a list of commands somewhere to look the syntax for these settings up?
Also currently the submitted scene file goes into the DeadlineRepository/jobs folder. Is there a way to change where this gets saved or saved a 2nd copy in the actual project directory of maya/renderScenes or something similar?
The following should work:
AddLongAttribute( "deadlineSubmitMayaScene" );
setAttr defaultRenderGlobals.deadlineSubmitMayaScene true;
AddLongAttribute( "deadlineStrictErrorChecking" );
setAttr defaultRenderGlobals.deadlineStrictErrorChecking true;
You can check the SavePersistentDeadlineOptions function in SubmitMayaToDeadline.mel to see the other available options.
In Deadline, you can configure a network location to store scene files instead of the repository. Just note that it’s a global setting, and will affect all jobs, not just Maya jobs:
thinkboxsoftware.com/deadlin … iary_Files
Hope this helps!
Thanks! The SantityCheck script for Maya is working now.
The Job Auxiliary Files isn’t quite what we need as this gets put in an absolute place. We would need to have it save into a relative directory based on what project it’s for (even if it’s just a copy of the scene file). For example, Project01/maya/RenderScenes folder. But when submitting a different job it would go into Project02/maya/RenderScenes This would allow us to have the render files already included in the directory for when the project goes offline for archive.
You might be able to do this in the sanity check. You would just have to call the appropriate melscript command to save the scene file to the appropriate location. In the main maya submission script, this is how we save the scene:
// Save scene, if necessary
if( `file -q -modified` )
{
print( "Maya scene has been modified, saving file\n" );
file -save;
}
else
print( "Maya scene has not been modified, skipping save\n" );
I’m sure the “file” command allows you to pass it a path as well to save a copy.
To get the file name of the current scene file (which you’ll probably need when saving the copy), use this:
string $currentSceneFilePath = `file -q -sceneName`;
Hope that helps!
I used your code to get it to auto fill in the scene file in the Job Name section of the submission using:
AddStringAttribute( “deadlineJobName” );
setAttr defaultRenderGlobals.deadlineJobName -type file -q -sceneName
;
So that part works. But when I tried to have “Maya” filled in by default to the Department section (trying different variations) of this, nothing showed up:
AddStringAttribute( “deadlineDepartment” );
setAttr defaultRenderGlobals.deadlineDepartment -type “Maya”;
Similarly I wanted to have the Output Path go to ProjectName/maya/images/render folder instead of just ProjectName/maya/images. In the submission I saw a section called:
// Set the output image directory in the text field.
global proc SetImageDir()
{
global string $ImageOutputPathGrp;
string $newdir = SafeDeadlineCommand( “-getdirectory “” + textFieldButtonGrp -q -text $ImageOutputPathGrp
+ “”” );
if( $newdir != “” )
textFieldButtonGrp -e -text $newdir $ImageOutputPathGrp;
SavePersistentDeadlineOptions();
}
But not sure how to write the modified version in the CustomSanityChecks file? Maybe something like a $ImageOutputPathGrp` + “” + “render” + “”
Try this instead:
AddStringAttribute( "deadlineJobName" );
setAttr defaultRenderGlobals.deadlineJobName -type "string" `file -q -sceneName`;
AddStringAttribute( "deadlineDepartment" );
setAttr defaultRenderGlobals.deadlineDepartment -type "string" "Maya";
You were missing the “string” type, which I’m guessing was the problem.
The “SetImageDir” function is called when the user presses the “…” button to browse for it in the submitter. This is actually one of the few settings we don’t store as an attribute in the scene file. You may have to modify the main script yourself to get this behavior. We call the “GetImageDirectory” function in the main script to get the output directory.
Cheers,
I’m still struggling with how to write the script that saves a scene file in /maya/renderScenes/ folder when you submit a job. I was looking at the code for another script called “SaveACopy” (polygonspixelsandpaint.tumblr.co … 4864945319) and pulled the following:
string $justLongNameNoMa[];
$numTokensToo = tokenize $currentScenePath "." $justLongNameNoMa
;
file -rn ($justLongNameNoMa[0] + “_” + “RenderScene”);
file -f -save;
file -rn $currentScenePath;
How would I tell it to save into a different directory (currently running this in the script editor will save the scene copy in the ‘scenes’ folder)? Also I suppose you’d want it to save the copy only when you actually hit Submit and it gets sent off to Deadline. Are you able to do this from the CustomSanityChecks.mel?
Because CustomSanityChecks.mel is called prior to the submitter being displayed, you can’t use it to save a copy of the file when the Submit button is pressed. You’ll have to modify the main submission script to do that.
Perhaps instead of saving the scene to the other location, maybe you could just copy it using sysFile:
download.autodesk.com/global/doc … index.html