Draft From DeadlineCommand

Is it possible to initiate and run a Draft Job from DeadlineCommand in a fashion similar to executables:

DeadlineCommand.exe -SubmitCommandLineJob -executable “P:/My_Executable/my_executable.exe” -arguments " -t 1-10

I understand Drat is not an executable but the Python script. So the syntax should be a quite different.

Something like:

DeadlineCommand.exe -SubmitScriptJob -script “P:/my_Draft_Folder/draft.py” -arguments “startFrame=1”

If it is possible to initiate a Draft Job using deadlinecommand.exe then please make a simple example of the command line to be used… with a single argument or a parameter passed to Draft… such as a frame range or a Shotgun’s Entity_Name or Entity_type as a parameter passed. Many thanks in advance!

If you just want to submit a Draft job to the farm, you can just use the regular submission interface through DeadlineCommand. To do so, you’ll have to build up two separate files containing the job and plugin parameters, respectively.

The first file (the Job Info file) contains generic Job parameters and properties, such as the pool & group being submitted to, the priority, which Plugin the job is for (in this case, it would be Draft), etc. Each line in the file should be a single key-value pair in the format ‘key=value’. This, along with available properties, is all in our documentation: thinkboxsoftware.com/deadlin … _Info_File

The second file (the Plugin Info file) contains all the plugin-specific parameters and properties for the Job. This is less well documented, since (obviously) the available parameters vary greatly from plugin to plugin. In the case of Draft, the plugin expects the following:

  • The path to the Draft script to run. (key: ‘scriptFile’)
  • The arguments to pass to the Draft script. (key: Either ‘arguments’ or ‘ScriptArg#’)
  • A post-render script (used for uploading to Shotgun). (key: ‘postRenderScript’)

So, a sample Plugin Info file for Draft could look something like this:

scriptFile=P:/my_Draft_Folder/draft.py
arguments=username="jon" entity="Shot 1" version="Demo Project_Shot 1_FX 3 (jon)" startFrame=0 endFrame=144 frameList=0-144 outFile="P:/Output/file.mov"...

Or, if you’re using the ScriptArg# syntax:

scriptFile=P:/my_Draft_Folder/draft.py ScriptArg0=username="jon" ScriptArg1=entity="Shot 1" ScriptArg2=version="Demo Project_Shot 1_FX 3 (jon)" ScriptArg3=startFrame=0 ...

Now, once you have the Info files, the actual submission through DeadlineCommand is really straightforward:

DeadlineCommand.exe "C:/Path/To/Job_Info_File.job" "C:/Path/To/Plugin_Info_File.job"

If it helps, you should be able to compare against the .job files that the Monitor creates when submitting a Draft job from the standalone submitter. They should be getting created in %LOCALAPPDATA%/Thinkbox/Deadline/temp on Windows.

Hope this helps,

  • Jon

Thanks for the clarification! Now it all makes sense!