Hey,
I’m curious to know what the easiest way to go about attaching a post py script to my submission is.
Currently the artists are using the MAYA UI you’ve packaged with Deadline to submit, but I’ve wrapped it, so that our default options are set in the UI automatically.
once the job has been submitted to deadline, I can go the job properties in the monitor, and add a python script to run, POST completion. Obviously I dont want to do this manually. My question is - can i continue to use the UI you’ve provided, and still have the option to tack on this post process? or do i have to create a custom job submission that will run out of maya, and include the py script that will run after the job completes in that submission?
-THanks,
You will have to modify the Maya UI submission script to add this functionality. You can do one of two things:
- Add a field to allow the user to specify a script.
- Hardcode the post script setting that is specified during submission.
If you’re always running the same script, or running a certain script based on the scene properties, (2) might be the way to go because it avoids user error. Check out this documentation for all the available submission options:
software.primefocusworld.com/sof … _Info_File
In this case, you’ll want to use the PostJobScript= setting.
Cheers,
PS: We’ll eventually add these script options to the Maya UI.
beautiful.
thanks for that nudge in the right direction.
One more question.
What is executed first?
a) The copying of files that were rendered locally to their final destination
or
b) PostTaskScript
My goal is to run a py script after the task has completed, and the frames that have been rendered during that task have been copied to the file server.
If i specify a PostTaskScript, will it be run after the images have already been copied over to the file server?
-THanks,
The copying of the files gets executed first, so you shouldn’t have any problems.
Cheers,
I imagine it would be pretty tricky to get this to work on a post “task” basis wouldn’t it?
It makes sense that postJobScript would run fairly smoothly.
I foresee problems occurring when my external python script needs to know which frames, and from what filepath to copy those frames “FROM”, once a task is completed.
I can get the $outputFilePath (@ SubmitMayaToDeadline.mel) for the job which would contain all frames rendered, but prior to submitting the jobs I cannot determine what the filepaths/filenames will be when dealing with renderPasses, and filename tokens in the renderGlobals ($layerOutputFilePrefix). As far as I know, maya is dealing with the tokens it’s being given by the SubmitMayaToDeadline.mel script and outputting the frames to the appropriate folders internally.
I’ll stick to the postJobScript, unless you can offer some insight as to how I might obtain a filepath to each of the renderPasses prior to them being submitted to deadline as a job. It’s likely to be an overly complex process of extracting the pass names and converting them to a usable filepath via filename-token ($layerOutputFilePrefix).
Yeah, I think using a post job script in this case might be the more straight forward solution. Once you have that working, it might be worth seeing if it could translate to post task scripts.
Cheers,