AWS Thinkbox Discussion Forums

[SOLVED] Nuke Auto Submission and Render ENV

Hi,

I have two questions:

  1. 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?

  2. Can the Deadline Nuke Submitter set the job ENV variables in any way?

anyone?

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.

docs.thinkboxsoftware.com/produ … nvironment

github.com/ThinkboxSoftware/Dea … onmentCopy

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

Ah, sorry for the delay here. It’s been a week!

Also, Mike beat me to it. I’m posting mine here too. :smiley:

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. :slight_smile:

Environment:

That’s definitely doable. The jobs can take an arbitrary number of env vars as “EnvironmentVariable0=SomeKey=SomeValue” as here:

EnvironmentKeyValue0=TMP=C:\Users\edwin\AppData\Local\Temp
EnvironmentKeyValue1=COMPUTERNAME=MyCompy

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.

Thanks guys, I know its been busy here too!

Okay so lets leave the first question for now.

Does the standard submitter have this behaviour?
This would work fine for me

If so, what “global init” am I missing for the sanity checks?

So this has been solved through support and some tinkering.

in the submitNuketoDeadline.py script, add these two lines where the jobinfo file is written (each in their own for loop):

nuke_env = os.getenv(“NUKE_PATH”)
fileHandle.write( “EnvironmentKeyValue0=NUKE_PATH=”+nuke_env+"\n" )

nuke_env = os.getenv(“NUKE_PATH”)
fileHandle.write( EncodeAsUTF16String( “EnvironmentKeyValue0=NUKE_PATH=”+nuke_env+"\n" ))

Privacy | Site terms | Cookie preferences