I want to submit the job after running CustomSanityChecks without it showing the deadline submitter window (My Custom Sanity Check already sets the required values and has a panel with some options)
Is this possible?
Can the Deadline Nuke Submitter set the job ENV variables in any way?
deadlinecommandbg.exe instead of deadlinecommand.exe will not show the job submission success dialog after job submission. Is this what you mean?
env var’s can be injected into a job at submission time. Several ways to achieve this. In your custom submission script, inject just the env vars you care about, or inject the entire user submitting env into the job (which might end up injecting too much) or use an event plugin, to grab the env vars, then it could work for multiple app submitters and not just be tied to Nuke.
Before you dive into the code, I suggest you manually submit one of your jobs and then manually add the ENV VAR’s you wish via the Deadline Monitor GUI to validate what you are trying to do first, before touching any code: docs.thinkboxsoftware.com/produ … nvironment
Also, Mike beat me to it. I’m posting mine here too.
Having the Sanity Check submit the job:
The sanity check is designed to return true/false so that alone won’t get you very far. You might have better luck forking the submitter and just cutting down the UI and then automatically calling the submit function. Starting with… I believe 9.0, you can copy the submitter into “[repo]\custom\submission\Nuke\Main” and it should get loaded by the bootstrapper script running inside Nuke.
If not, we can battle that problem when it comes up.
Environment:
That’s definitely doable. The jobs can take an arbitrary number of env vars as “EnvironmentVariable0=SomeKey=SomeValue” as here:
As far as the tooling in the Nuke submitter goes… I took a look here and there’s no tooling to pass those variables, so you’d have to adapt both SubmitJob() and SubmitSequenceJobs(). This would get pretty deep. Optionally, you could use “IncludeEnviornment” which would copy the submitting environment verbatim and use a few variable overrides to mask out things like temporary directory. Third angle is an OnJobSubmitted that could handle the same which would leave the submitter a little less modified.