How to Make Draft Aware of Post Render Job Data

I wrote a Python script allowing us to start a rendering job from inside of Maya. First the script creates two sets of *.job files for both Maya and Draft.
Then it uses a familiar to us already “deadlinecommand.exe -Multi -job job_01.job -job -dependantonprevios job_02.job” syntax to launch both jobs (thanks for explaining it a great details in your earlier posts).
Aside from writing down the job files and submitting them to Deadline the script creates and updates Shotgun Version filling its fields with the appropriate values (it happens before the Deadline job starts).

I wonder what syntax we should be using in Draft *.job files to make Draft to be able to read the information about the Deadline job itself when this information (or data) becomes available: such as Deadline Job ID number, average render time and…
The supplied with Deadline Maya-to-Deadline submitter is able to do it. If a rendering job is initiated from within Maya with a “Update Shotgun” option activated Draft (aside from generating a QuickTime movie and uploading it to Shotgun) updates a Version’s Property Page with a Deadline Render job’s summary (which are only available after Deadline finishes a rendering job).
Many thanks in advance!

The way we do this, and the way I would recommend doing it on your end, is to use Event Plugins. An Event Plugin is similar to a regular plugin, but it has different functions that trigger when Jobs change to a specific state (see our docs here: thinkboxsoftware.com/deadlin … eventssdk/).

Our built-in Draft integration uses an Event Plugin to create a Draft job once the initial (e.g. Maya) job completes, instead of creating it right away, and making it dependent on the original (Maya) job like you’re currently doing. The advantage of doing it this way is that you would get access to the post-render stats of the first Job, and it sounds like this would accomplish your goal. See our documentation here for all the properties you have access to in the Job objects (which is relevant here): thinkboxsoftware.com/deadlin … rview/#Job

You can probably have a look at our built-in Draft Event plugin (located at ‘events/Draft/Draft.py’ in your repo), and that should give you a pretty good idea of what you Event Plugin would look like.

Hope this helps,

  • Jon