Skip to content

Commit

Permalink
Merge pull request #27 from BigRoy/chore/simplify_startup_envs
Browse files Browse the repository at this point in the history
Remove `HOUDINI_MENU_PATH` from `add_implementation_envs`
  • Loading branch information
BigRoy authored Jul 10, 2024
2 parents 993ad14 + e4b7538 commit a41dd9a
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions client/ayon_houdini/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ class HoudiniAddon(AYONAddon, IHostAddon):
host_name = "houdini"

def add_implementation_envs(self, env, _app):
# Add requirements to HOUDINI_PATH and HOUDINI_MENU_PATH
# Add requirements to HOUDINI_PATH
startup_path = os.path.join(HOUDINI_HOST_DIR, "startup")
new_houdini_path = [startup_path]
new_houdini_menu_path = [startup_path]

old_houdini_path = env.get("HOUDINI_PATH") or ""
old_houdini_menu_path = env.get("HOUDINI_MENU_PATH") or ""

for path in old_houdini_path.split(os.pathsep):
if not path:
continue
Expand All @@ -28,20 +25,9 @@ def add_implementation_envs(self, env, _app):
if norm_path not in new_houdini_path:
new_houdini_path.append(norm_path)

for path in old_houdini_menu_path.split(os.pathsep):
if not path:
continue

norm_path = os.path.normpath(path)
if norm_path not in new_houdini_menu_path:
new_houdini_menu_path.append(norm_path)

# Add ampersand for unknown reason (Maybe is needed in Houdini?)
# Add & (ampersand), it represents "the standard Houdini Path contents"
new_houdini_path.append("&")
new_houdini_menu_path.append("&")

env["HOUDINI_PATH"] = os.pathsep.join(new_houdini_path)
env["HOUDINI_MENU_PATH"] = os.pathsep.join(new_houdini_menu_path)

def get_launch_hook_paths(self, app):
if app.host_name != self.host_name:
Expand Down

0 comments on commit a41dd9a

Please sign in to comment.