Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
sync $JOB and [JOB]
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJafar committed Sep 26, 2023
1 parent fd8daeb commit a349733
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions openpype/hosts/houdini/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,12 @@ def update_job_var_context():
job_path = os.environ["HIP"]

current_job = hou.hscript("echo -n `$JOB`")[0]

# sync both environment variables.
# because when opening new file $JOB is overridden with
# the value saved in the HIP file but os.environ["JOB"] is not!
os.environ["JOB"] = current_job

if current_job != job_path:
hou.hscript("set JOB=" + job_path)
os.environ["JOB"] = job_path
Expand Down

0 comments on commit a349733

Please sign in to comment.