Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove HOUDINI_MENU_PATH from add_implementation_envs #27

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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