mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #5622 from ynput/enhancement/OP-6381_Update-deadline-GlobalJobPreLoad-to-update-job-env
Deadline: set PATH environment in deadline jobs by GlobalJobPreLoad
This commit is contained in:
commit
2c18900940
1 changed files with 12 additions and 0 deletions
|
|
@ -385,6 +385,12 @@ def inject_openpype_environment(deadlinePlugin):
|
|||
for key, value in contents.items():
|
||||
deadlinePlugin.SetProcessEnvironmentVariable(key, value)
|
||||
|
||||
if "PATH" in contents:
|
||||
# Set os.environ[PATH] so studio settings' path entries
|
||||
# can be used to define search path for executables.
|
||||
print(f">>> Setting 'PATH' Environment to: {contents['PATH']}")
|
||||
os.environ["PATH"] = contents["PATH"]
|
||||
|
||||
script_url = job.GetJobPluginInfoKeyValue("ScriptFilename")
|
||||
if script_url:
|
||||
script_url = script_url.format(**contents).replace("\\", "/")
|
||||
|
|
@ -509,6 +515,12 @@ def inject_ayon_environment(deadlinePlugin):
|
|||
for key, value in contents.items():
|
||||
deadlinePlugin.SetProcessEnvironmentVariable(key, value)
|
||||
|
||||
if "PATH" in contents:
|
||||
# Set os.environ[PATH] so studio settings' path entries
|
||||
# can be used to define search path for executables.
|
||||
print(f">>> Setting 'PATH' Environment to: {contents['PATH']}")
|
||||
os.environ["PATH"] = contents["PATH"]
|
||||
|
||||
script_url = job.GetJobPluginInfoKeyValue("ScriptFilename")
|
||||
if script_url:
|
||||
script_url = script_url.format(**contents).replace("\\", "/")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue