AWS Thinkbox Discussion Forums

DeadlineSubmissionScript Pull Request

SubmitNukeToDeadline.zip (24.5 KB)

I fixed the Deadline Submission Script to work correctly with Nuke Studio.

The comp objects you were working with were:

infos = item.source().mediaSource().fileinfos()
    for info in infos:
        comps.append(info)

but that’s too deep into the item objects. Staying up one level gives you paradoxically more information.

comps.append(item.source().mediaSource())

To get the filename you now use

comp.metadata()['foundry.source.fullpath']

instead of

comp.filename()
  1. It only submits .nk files now. Previously it would submit every clip even if it wasn’t a .nk file. They would error silently in the BG but would increase submission time by many times over depending on the number of clips in a sequence. Large projects now can take literally hours less time to submit.
(comp.metadata()['media.input.filereader'] == 'nk')
  1. In Python 2.0 versions of nuke a typo would error all submissions because both the info was submitted twice instead of info and job metadata.
args.append(jobInfoFile.encode(locale.getpreferredencoding()))
args.append(pluginInfoFile.encode(locale.getpreferredencoding()))
  1. I used the correct metadata field for .nk clips to actually get the frame range of the nuke file. Currently uses mediaInfo.startFrame() which is always 0. In all nuke scripts which start >0 the wrong frame ranges would be rendered.
comp.startTime()` and `comp.duration()
  1. The Chunk size was hard coded. It now uses the user defined range.

prior code: fileHandle.write("ChunkSize=1\n") > {} dialog.chunkSize.value()

  1. The Chunk size field was grayed out unless you opened a script. This was unnecessary so I commented it out.
self.chunkSize.setEnabled(self.hasComp and not self.separateTasks.value())
  1. When you select “Choose Sequences” I set the default checked state to unchecked. If you wanted all of them submitted you wouldn’t check this checkbox. If you don’t want to submit all of them, you probably are submitting less than half. Again huge workflow improvements when you have 150 sequences to pick from not having to uncheck 149 of them just to resubmit a specific sequence.
  • Gavin
3 Likes

Thanks for the work, but we can’t take your changes into the product as-is. The description is something we can use however, as outlined in this post you’ve likely already seen.

Once again, thanks!

1 Like

Yeah! Always appreciated Gavin!

1 Like

Updated post with fragments of code from Nuke API for reference. (And normal users can just download the replacement py file.)

1 Like
Privacy | Site terms | Cookie preferences