Deadline/Shotgun Variables

While watching Deadline+Shotgun Integration Demo video on:

thinkboxsoftware.com/news/20 … emo-b.html

I have noticed there are some predefined variables used in “Version Template” field. There are two lines of code there:

${shot}_${task}_v0000

${project} ${task} (${user})

where:

the variable ${project} is substituted with a pulled from Shotgun Project’s Name.
${shot} variable is apparently stores the selected Shot Name. And ${task} variable is responsible for delivering a Task Name.

I wonder if there is any place in the documentation or anywhere else where I could get a full list of those predefined variables in a syntax used there: ${varabile_name}
Is there a variable for storing the current file opened, the data, current working directory too?
How much of the current data Deadline Submission dialog box is keeping track of? Where is it all documented?

It is indeed in our Shotgun documentation, though it’s kinda tucked away in the Event Plugin Configuration section:
thinkboxsoftware.com/deadlin … Connection

So unfortunately none of the ones you inquired about are available :frowning:

Cheers,

  • Jon

While having a shortcut to name a Shotgun Version that is about to be created by Deadline is pretty cool (in form of ${project}${shot}${task}_${user}_v001)
I wish there would be a way to minimize the chance for names variations.
Ideally I want the Shotgun Version to be named exactly as the scene file that was used to render the image sequence.

Let’s say I submit a Maya scene file with the name: 12_15_pa_shot_A_Dynamics_v007.mb to be rendered with Deadline.
What would be ideal is if Deadline would name the Version with the same name as the Maya scene file that was used to render a Image Sequence. So the Shotgun Version name would be
the same as the Maya scene name: 12_15_pa_shot_A_Dynamics_v007

Once again:

Rendered Maya scene:…12_15_pa_shot_A_Dynamics_v007.mb
Shotgun Version generated by Deadline:…12_15_pa_shot_A_Dynamics_v007

Can we add another line of the code into Python script that would:

  1. First query the name of the Maya scene file that is currently opened (since it is being submitted to Deadline).
  2. Then it would assign the name of the currently opened Maya scene file to a Python string variable: my_scene_name
  3. my_scene_name variable is used to populate the field in Submit Job to Deadline dialog box.

The result: Shotgun Version generated by Deadline inherits the same name as the name of the scene file used during rendering.

I definitely see what you’d like to accomplish, and it does make sense to add something like that in. It might be easiest to just base it off the Deadline Job Name, though (which typically pulls from the scene name by default), since that would be a nice application agnostic way to provide similar functionality. I’ll log this as a feature request for when we do another pass on the Shotgun stuff :slight_smile:

In the meantime, if you DID just want to do a swap-in for the Deadline JobName, you could just change your Shotgun.py event plugin script to add in the second line below:

version = re.sub( '(?i)\$\{jobid\}', job.JobId, job.JobExtraInfo3 ) #swap out the placeholder for the job ID
version = re.sub( '(?i)\$\{jobname\}', job.JobName, version ) #swap out the placeholder for the job Name
description = " (" + job.JobId + ")"
...

Cheers,

  • Jon