Sending Custom Info to and from Deadline

While submitting a job from within Maya there is an option in a Submission dialogue box (under Shotgun tab) to update a Shotgun Shot’s Path_to_Frames field with the information on where the rendered images are saved such as:

c:/path/to/rendered/images/images.####.jpg

After the job is submitted I can right-click the job name in a Deadline Monitor and choose Modify Properties. Under an “Extra Info” tab I can see all the Shotgun’s data associated with the job is being stored there: a User Name, Entity_Type, Entity_Name, Entity_ID, Task and etc.
The same “extra-info” data is also could be found in a plugin_job_info.job file. It is stored there using Key=Value syntax (such as Entity_Name = Shot_Name_001 for example).

I wonder if it would be possible to make a Deadline to update some Shotgun Shot’s custom fields with the information or data I choose.
For example: In a Shotgun I create a Shot’s custom field "sg_my_extra_info_field"to be used to store the Maya scene file name used to render the image sequence (so I could track it down later if I have to).
Capturing a Maya scene file name into a variable is not difficult…
The question consist of two parts:

  1. How to submit the information (in this case it is a variable’s value of the Maya scene file name) to Deadline so Deadline stores it in the same Extra-Info page (right click job’s name).
  2. And how to query this data from Deadline with Python so this information (or data) could be submitted to Shotgun.

This question probably can be explained by showing how to query data from Deadline…

Thanks in advance!

So first off, I’ll mention that there are two types of ExtraInfo fields: the static ExtraInfo0-9 that are in every job, and the ExtraInfoKeyValuePairs, which are not static and can be arbitrarily named.

I would recommend using the ExtraInfoKeyValuePairs for this, since then you don’t run into the risk of conflicting with something else that might be using the static fields.

Anyways, to add ExtraInfoKeyValuePairs to a Job at submission time, you need to add a line like this to the Job info file:
ExtraInfoKeyValue#=Key=Value

Note that the ‘#’ in the above example NEEDS to be unique and always increased by one, starting at 0. E.g., if you have multiple KVPs, it would look something like this:
ExtraInfoKeyValue0=Key0=Value0
ExtraInfoKeyValue1=Key1=Value1
ExtraInfoKeyValue2=Key2=Value2

This is something you REALLY need to be aware of if you’re adding to a submission script that’s already doing Shotgun/Draft stuff, since those integrations already use up some numbers, so you’d have to pick up where they left off. We usually use a variable in our submission scripts to track the next available ID for the KVPs when submitting.

Now, for getting those values back out again, your script would obviously have to be running in the context of Deadline (as an Event Plugin most likely, but you could probably do a post-job script or something like that too). All you need is a reference to the Job in question, and you can use the following function:
job.GetJobExtraInfoKeyValue( “[KeyNameGoesHere]” )

For more details on what’s available from our different script contexts, you should check out our documentation:
thinkboxsoftware.com/deadlin … toverview/

Hope this helps,

  • Jon