Aug 30, 2010

Deadline - nuke post job script

We wanted to have an automatic process with deadline, to convert all the 3d renders to exrs with proper compression and autocrop (datawindow) option enabled. Currently I implemented this on linux, and I had to make a little hack to run nuke from shell. I think it's much easier on windows (no permission problems etc.) Usage:
So the main file is a pythonfile, a deadline post job script, the path of this has to be placed in deadline monitor, in the job properties panel. The machine that rendered the last task will "render" this extra task. The file gets data from deadline, like output path, frame range etc. Then it's executing a nuke render, from command line, but the renderable file is not a nuke script, but another python file. It could be a nuke scene, with a read and write node, but I think it's nicer to generate the nodes on the fly, and this way no problem with script paths etc.
So we have 2 python files at this point: a "JobNuke2exr.py" which should be placed in deadline, and "glt_deadlinepostjob.py" which should be reachable by nuke and deadline (that's why I inserted a line with sys.path.append in the first python file, it should be edited). To make it more complex, I had to make an .sh file, (like a .bat on windows) that launches nuke from terminal, with arguments, because the specific deadline command (SpawnProcess) couldn't make this. Of course this .sh file needs also be edited, because it contains the path to nuke executable.
So the first .py calls this .sh, that fires nuke, that renders the other .py! Easy, no? :)
A little thing with the process that has to be solved: currently nuke rendering checkerboards, and not skipping missing frames.
Here you can download the files
I'm sure this whole postprocess can be achieved much easier, but at this point this is working here. Comments, tips are welcome.
Gabor

4 comments:

  1. You can take a look at Job Script: http://www.benivolent.com/opensource-job-script.html.They offer free and paid editions of job portal script.

    php job script | php job search script

    ReplyDelete
  2. Aspiring to become an amazing blog writer like the writer of this blog.
    resumeyard.com

    ReplyDelete
  3. This sounds like a clever solution, but your link has gone dead. Do you still have the files from 9 years ago?

    ReplyDelete
  4. Hi Dan, thanks for the catch! I edited the missing link, it now points to a somewhat newer version of the old script. But I wrote this years ago, and deadline has changed a lot since then, it may or may not work. Actually I have more advanced postjob scripts, but only for windows. What is your aim with these scripts? Just to examine it or more specific?
    Cheers, Gabor

    ReplyDelete