AWS Thinkbox Discussion Forums

PreTaskScript modified environment to Nuke

Hello,

I have recently completed the implementation of a PreTaskScript to perform some setup tasks by modifying the PYTHONPATH in the current environment (not the Job environment). While this approach worked successfully for MayaBatch and Python plugins, I encountered an issue with Nuke. It appears that the modified environment set by the PreTaskScript is not being transferred to the Nuke plugin. I had expected this approach to be consistent across different plugins.

Could you provide information on how Deadline handles this situation and whether this behavior is considered normal?

Thank you.

We should check if the pre-task script was added to the job properly. Did you assign the script by right-clicking on the desired Job in the Monitor, and selecting ‘Modify Job Properties’. The script options can be found under the ‘Scripts’ section of the Job Properties window.
If you resubmit the job, do you see the PreTaskScript flag set in the Submission Params options under ‘Modify Job Properties’ panel.

If it is not showing up in the submission params, then can you explain how did you assign the script to the Nuke job?

Yes the PreTaskScript is visible in the Job Property window, the job was created in python using the deadline API and webservice. The PreTaskScript is properly set up and executed successfully. The environment is modified as expected, which is confirmed by the prints I added to the logs. However, the issue arises when I attempt to print the environment in the Nuke script or in the Nuke init.py, as it does not reflect the modifications made by the PreTaskScript.

Here are the plugin info specified :

BatchMode=True
SceneFile=my_nuke_scene_path.nk
ScriptFilename=my_script_file_path.py
ScriptJob=True
Version=14.0

Is it just Nuke and Nuke’s init scripts that fail to read this? If you set an environment variable on the machine and do the same thing does Nuke fail to read it?

My gut says it’s a Nuke-specific problem since Deadline sets the environment for all plugins but I’m not quite sure how to prove it otherwise.

if that can help, I created a custom “Simple” deadline plugin executing nuke and there is no problem to read environment variable set by the PreTaskScript in this case. It really seems to be problematic with the native deadline nuke plugin.

Privacy | Site terms | Cookie preferences