AWS Thinkbox Discussion Forums

scripted draft job submission

Hi!

How do you submit a draft job via python?
Example: I create a playblasted jpg sequence from Maya via a python script and would now like to use a Deadline/Draft Job to put burnins and a slate onto the playblast output and create a quicktime from the result.

I found the scripting reference, and it seems like Deadline.Scripting.RepositoryUtils.SubmitJob ( string[] jobFiles ) would be the starting point, however, how do I even import the Deadline python module from, e.g. Maya or standalone python?

Also, I found the docs for the job info file, but what would I need to put into the plugin info file? Is that documented somewhere?

Thanks,
SebastianH

Hey Sebastian,

In order to use all those ScriptingUtils functions, the python script needs to be run through Deadline, there’s no way to use those otherwise (since we’re using Python.NET hooks to call managed code).

You can still submit Jobs from outside Deadline, however, using our DeadlineCommand utility – it also takes Job/Plugin Info files as arguments.

In terms of documentation for what is contained in Plugin Info files, we don’t really have any, since it’s plugin-specific. Fortunately, the Draft one is pretty straight-forward. One of the arguments is ‘scriptFile’, which specifies where the Draft script that should be run is located, and a list of args to pass to the script. These latter ones are specified as ScriptArgX, where X is an increasing integer. Here’s an example of a plugin info file for Draft, that I pulled from one of my submissions:

scriptFile=\\fs-01\Test\test.py ScriptArg0=username="jon" ScriptArg1=entity="IJ Mini" ScriptArg2=version="Shotgun Integration Demo (Demo Project | IJ Mini)" ScriptArg3=inFile="\\fs-01\public\users\jon.gaudet\TestOutput\test\blam_cube.mov" ScriptArg4=outFolder="\\fs-01\public\users\jon.gaudet\TestOutput\test\Draft" ScriptArg5=outFile="\\fs-01\public\users\jon.gaudet\TestOutput\test\Draft\blam_cube.mov" ScriptArg6=startFrame=1 ScriptArg7=endFrame=100 ScriptArg8=frameList="1-100" ScriptArg9=deadlineJobID=52f935b5eba2a609687ac3b8 ScriptArg10=

Basically, you just need to specify the Script File (I believe you could also alternatively submit the Script with the Job as an auxiliary file), and any arguments your Draft script expects as ScriptArgs

Hope this helps!

  • Jon

Hey Jon,

all right, cool, that will work.

Thanks!
Sebastian

Privacy | Site terms | Cookie preferences