AWS Thinkbox Discussion Forums

Pass Output Path to Job

How do I pass the output path to Deadline for Draft Jobs? I have a function inside my Draft scripts for querying the output path of a batchDraft package and would like to enable the right click “copy output path” functionality.

You need to set the OutputFilename (and possibly OutputDirectory) in the Job submission:
thinkboxsoftware.com/deadlin … ut_Options

So I would edit the Draft Event plugin?

The event plugin should already be setting that. I thought you were doing custom submission stuff, not the Event Plugin. That’s what I get for assuming things I guess :slight_smile:

Is the output path not being shown in the Monitor for copying/browsing? Because the Event plugin sets the outputFilename to be the same thing it passes to Draft in the ‘outputFile’ parameter…

I’m using my batchDraft API so no outfilepath is being specified it’s all dynamically configured through the BD plugin settings. So there is no reflexive calls to a batch .py to query its output? I can add that I suppose to the event plugin. It would be a nice thing to standardize though since I imagine most draft scripts output multiple files and don’t respect the draft args.

The only way Deadline can know about the output is if you specify it. I’m not sure what you mean by standardizing it, though… It is standardized, you just need to specify it at submission time :stuck_out_tongue:

Draft Scripts should be like BatchDraft in that they have a .execute() function and a .getOutputs() function.

Then when you specify \path\to\draftscript\resize2HD.py as your batch file the submission script does this.

import sys sys.path.append("////path//to//draftscript//") import resize2HD DeadlineJobOutputs = resize2HD.getOutputs()

then later when it’s time to run you just do:

import sys sys.path.append("////path//to//draftscript//") import resize2HD resize2HD.execute()

Alternately I had a ‘shower breakthrough’ this morning. You could just have a default arg and not change up how you handle batch templates entirely.

getOut=True;

then in the batch script you could simply run:

if getOut:
print “output paths”
else:
draft.stuff()

I don’t really understand why the Draft Script should be responsible for telling Deadline where the output is. That’s the opposite of how everything else works in Deadline. If the output is known at submission time, Deadline will know where to look for it. If not, then it won’t.

I don’t think we should be making a special case for Draft, especially since this all works fine if you set the output at submission time.

Because Draft jobs are dynamically generated. Based on different draft scripts you might create an H264 or an AVI or an image sequence. Why should Draft know what the output is? It doesn’t the event plugin is just applying a one-size fits all solution to every single draft script. It would be as silly as dynamically generating a 3ds max job that only outputs to one path based on the file name of the .max file.

Wouldn’t whatever is generating the dynamic Draft job know what kind of output is desired, and set the value for outFile appropriately? And, if you want multiple output files (for example, extracting frames from a video), you can use the #### method the same way as on the inFile field.

I think you’re confusing Draft, Deadline, and scripts that use Draft. Draft is a library that can be called from a python script. The python script can either be run on the command line, or from within Deadline. As a library, Draft isn’t the one deciding what the output file is, that is specified by the script, which may or may not use parameters to determine (or help determine) what the output file is. Deadline can input suggestions to the script as parameters, but whoever writes the script is the one who decides what to do with them.

Am I misunderstanding you?

Cheers,
Andrea

Yeah we’re in agreement. But Draft as an API, Draft as it’s implemented in Deadline are somewhat different.

I guess I’m saying that Draft (Deadline) scripts should have a best practices system setup so that deadline can query the script and understand what it’s doing. The Deadline Draft Event script shouldn’t be put into a position where it assumes where the Deadline Draft script will output its files. There should be a mechanism by which Deadline Draft Event queries the script and the script replies “I’m outputting 3 files to ___, ____ and ____.”

That’s how I’m going to setup our Event script, however it seems like Thinkbox should do the same.

Ah, so you’re referring to the Draft.py plugin script, as opposed to Draft the API or scripts that use the Draft API?

I’m a “Draft the API” person, not a Deadline / Draft plugin person. Jon’s the one you need to convince for that. :wink:

Privacy | Site terms | Cookie preferences