Good afternoon,
I’ve been messing around with trying to add Deadline QuickDraft to submit automatically and I just can’t seem to get it to work. Below is my CustomSanityCheck.py. Everything works fine up until I get into the Draft section. I am not sure what I am missing or doing wrong for it to kill my Sanity Check.
The reason behind this is to have it submit in the background from Nuke so the artists don’t have to load the pipeline tools options on their submission.
If there are better ways to go about doing this, please let me know as I am new to setting this kind of stuff up with Deadline/Nuke.
import nuke
import DeadlineGlobals
def RunSanityCheck():
DeadlineGlobals.initPriority = 60
DeadlineGlobals.initConcurrentTasks = 2
DeadlineGlobals.initLimitConcurrentTasks = 2
DeadlineGlobals.initSelectedOnly = True
DeadlineGlobals.initChunkSize = 5
DeadlineGlobals.initUseGpu = False
DeadlineGlobals.initDraftQuick = True
DeadlineGlobals.initDraftCodec = h264
DeadlineGlobals.initDraftFormat = mov
DeadlineGlobals.initDraftResolution = 1
DeadlineGlobals.initDraftQuality = 100
nuke.message("DEFAULT VALUES SET\n \tPriority - 60\n \tConcurrent Tasks - 2\n \tBatch Size - 5\n \tGPU Rendering - Disabled ")
return True
Thanks!
Firstly, you should post the error message in such cases.
Second - there are no literals h264
and mov
. If they are strings, they need to be quoted:
DeadlineGlobals.initDraftCodec = "h264"
DeadlineGlobals.initDraftFormat = "mov"
1 Like
Thanks for the reply mois.
I don’t actually get any error message (at least that I can see). The only reason I know it isn’t working is that its not grabbing any of the variables I put in. But the Sanity Check works in adjusting the priorities, chunk size etc.
I can’t even get the pipelinetools/Draft option to even launch automatical with the DeadlineGlobals. It just ignores all the “Draft” lines.
I tried putting the h264 and mov in quotes but that didn’t change anything.
You need to check the code/documentation to see if these property names are correct. It is possible that they changed.
1 Like
I’ve been poking around in the quickdraft bit of our submitter code recently and as far as I can tell QuickDraft isn’t enabled unless you either enable it via the UI or if there’s a pre-existing pipeline settings file associated with the scene you have open. You’re correctly setting variables, but they’re getting thrown out.
Instead, if you’re looking to have the same quickdraft settings for all Nuke jobs, I’d do that in an OnJobSubmittedCallback event plugin that checks if the plugin is Nuke before setting those extra info values. If you want to be sure of the key/value pairs, submit a job manually with the QuickDraft settings you’d like. Then double click the job in the Monitor and go to the ‘Job Extra Info’ panel and you’ll see what the submitter creates.