I wanted to use the ExtraInfo9 field to track the name of the project to which my submitted Nuke script belongs. I have this value in Nuke, but as there is no
global initExtraInfo9
or something in the DeadlineGlobals.py, I can’t use something like
DeadlineGlobals.initExtraInfo9 = projectname
in my CustomSanityChecks.py.
So it seems like I have to handover the value via environment variable to the actual SubmitNukeToDeadline.py and treat it there, right? Where/how would I do this best in SubmitNukeToDeadline.py without having to change too much compared to your original file, so I can reapply the same customization easily to future updated versions of SubmitNukeToDeadline.py?
Having that info in the DeadlineGlobals struct is a good idea. I’ve made an internal ticket to have us modify that in the future. If you set values in the struct for EI0-6 (that would be set by Draft or Shotgun) it will get clobbered, but EI9 should be safe.
The way you’d handle this now is by adding a single line to the following functions:
SubmitSequenceJobs()
SubmitJob()
What you’re looking to add is for is the JobFile handles. You’ll only notice which file is being referenced from the open() calls because we re-use the ‘filehandle’ variable. Just put one more line at the beginning of the job file for your extra info, and that should do it.