Skip to content

Commit

Permalink
Merge pull request #131 from nfa-vfxim/dev
Browse files Browse the repository at this point in the history
Fix Houdini OTL scan path
  • Loading branch information
mervinvb authored Nov 1, 2023
2 parents 33f626a + 2d13b7a commit b8008d7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hooks/tk-multi-launchapp/before_app_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def execute(self, app_path, app_args, version, engine_name, **kwargs):
houdini_otls_template = tk.templates["houdini_otls"]
otls_path = houdini_otls_template.apply_fields(current_context).replace(os.sep, '/')

# Add environment
# Check if HOUDINI_OTLSCAN_PATH exists in environment, if it's empty add the default value back
HOUDINI_OTLSCAN_PATH = os.environ.get("HOUDINI_OTLSCAN_PATH")
if HOUDINI_OTLSCAN_PATH is None or HOUDINI_OTLSCAN_PATH == "":
sgtk.util.append_path_to_env_var("HOUDINI_OTLSCAN_PATH", "@/otls")

# Add the project otls path to the environment
sgtk.util.append_path_to_env_var("HOUDINI_OTLSCAN_PATH", otls_path)

self.parent.log_info("Added otlscan path %s" % otls_path)

0 comments on commit b8008d7

Please sign in to comment.