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()
- 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')
- 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()))
- 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()
- The Chunk size was hard coded. It now uses the user defined range.
prior code: fileHandle.write("ChunkSize=1\n")
> {} dialog.chunkSize.value()
- 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())
- 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