From d43b3d1b2c0e61a67587700400a7b4d89fcd5357 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 18 May 2021 14:16:00 +0200 Subject: [PATCH] also pass Application object to `add_implementation_envs` --- openpype/hosts/aftereffects/__init__.py | 2 +- openpype/hosts/blender/__init__.py | 2 +- openpype/hosts/harmony/__init__.py | 2 +- openpype/hosts/hiero/__init__.py | 2 +- openpype/hosts/houdini/__init__.py | 2 +- openpype/hosts/maya/__init__.py | 2 +- openpype/hosts/nuke/__init__.py | 2 +- openpype/hosts/photoshop/__init__.py | 2 +- openpype/hosts/tvpaint/__init__.py | 2 +- openpype/hosts/unreal/__init__.py | 2 +- openpype/lib/applications.py | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openpype/hosts/aftereffects/__init__.py b/openpype/hosts/aftereffects/__init__.py index 1c2d473728..deae48d122 100644 --- a/openpype/hosts/aftereffects/__init__.py +++ b/openpype/hosts/aftereffects/__init__.py @@ -1,4 +1,4 @@ -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" defaults = { "OPENPYPE_LOG_NO_COLORS": "True", diff --git a/openpype/hosts/blender/__init__.py b/openpype/hosts/blender/__init__.py index 1a81c3add1..4d93233449 100644 --- a/openpype/hosts/blender/__init__.py +++ b/openpype/hosts/blender/__init__.py @@ -1,7 +1,7 @@ import os -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" # Prepare path to implementation script implementation_user_script_path = os.path.join( diff --git a/openpype/hosts/harmony/__init__.py b/openpype/hosts/harmony/__init__.py index 13b72f98d6..8560fbaf4b 100644 --- a/openpype/hosts/harmony/__init__.py +++ b/openpype/hosts/harmony/__init__.py @@ -1,7 +1,7 @@ import os -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" openharmony_path = os.path.join( os.environ["OPENPYPE_REPOS_ROOT"], "pype", "vendor", "OpenHarmony" diff --git a/openpype/hosts/hiero/__init__.py b/openpype/hosts/hiero/__init__.py index 5b036224e4..1781f808e2 100644 --- a/openpype/hosts/hiero/__init__.py +++ b/openpype/hosts/hiero/__init__.py @@ -2,7 +2,7 @@ import os import platform -def add_implementation_envs(env): +def add_implementation_envs(env, _app): # Add requirements to HIERO_PLUGIN_PATH pype_root = os.environ["OPENPYPE_REPOS_ROOT"] new_hiero_paths = [ diff --git a/openpype/hosts/houdini/__init__.py b/openpype/hosts/houdini/__init__.py index ab552513e8..8c12d13c81 100644 --- a/openpype/hosts/houdini/__init__.py +++ b/openpype/hosts/houdini/__init__.py @@ -1,7 +1,7 @@ import os -def add_implementation_envs(env): +def add_implementation_envs(env, _app): # Add requirements to HOUDINI_PATH and HOUDINI_MENU_PATH pype_root = os.environ["OPENPYPE_REPOS_ROOT"] diff --git a/openpype/hosts/maya/__init__.py b/openpype/hosts/maya/__init__.py index 43a1e6f7bf..d3562e2cdd 100644 --- a/openpype/hosts/maya/__init__.py +++ b/openpype/hosts/maya/__init__.py @@ -1,7 +1,7 @@ import os -def add_implementation_envs(env): +def add_implementation_envs(env, _app): # Add requirements to PYTHONPATH pype_root = os.environ["OPENPYPE_REPOS_ROOT"] new_python_paths = [ diff --git a/openpype/hosts/nuke/__init__.py b/openpype/hosts/nuke/__init__.py index ca4d931e2c..f1e81617e0 100644 --- a/openpype/hosts/nuke/__init__.py +++ b/openpype/hosts/nuke/__init__.py @@ -2,7 +2,7 @@ import os import platform -def add_implementation_envs(env): +def add_implementation_envs(env, _app): # Add requirements to NUKE_PATH pype_root = os.environ["OPENPYPE_REPOS_ROOT"] new_nuke_paths = [ diff --git a/openpype/hosts/photoshop/__init__.py b/openpype/hosts/photoshop/__init__.py index babacba9a8..a91e0a65ff 100644 --- a/openpype/hosts/photoshop/__init__.py +++ b/openpype/hosts/photoshop/__init__.py @@ -1,4 +1,4 @@ -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" defaults = { "OPENPYPE_LOG_NO_COLORS": "True", diff --git a/openpype/hosts/tvpaint/__init__.py b/openpype/hosts/tvpaint/__init__.py index 0e58e31a5b..0e793fcf9f 100644 --- a/openpype/hosts/tvpaint/__init__.py +++ b/openpype/hosts/tvpaint/__init__.py @@ -1,4 +1,4 @@ -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" defaults = { "OPENPYPE_LOG_NO_COLORS": "True" diff --git a/openpype/hosts/unreal/__init__.py b/openpype/hosts/unreal/__init__.py index dd7a575995..1280442916 100644 --- a/openpype/hosts/unreal/__init__.py +++ b/openpype/hosts/unreal/__init__.py @@ -1,7 +1,7 @@ import os -def add_implementation_envs(env): +def add_implementation_envs(env, _app): """Modify environments to contain all required for implementation.""" # Set AVALON_UNREAL_PLUGIN required for Unreal implementation unreal_plugin_path = os.path.join( diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index b95ba85fbe..a44c43102f 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1090,7 +1090,7 @@ def prepare_host_environments(data, implementation_envs=True): loaded_env = _merge_env(acre.compute(env_values), data["env"]) final_env = None - # + # Add host specific environments if app.host_name and implementation_envs: module = __import__("openpype.hosts", fromlist=[app.host_name]) host_module = getattr(module, app.host_name, None) @@ -1101,7 +1101,7 @@ def prepare_host_environments(data, implementation_envs=True): ) if add_implementation_envs: # Function may only modify passed dict without returning value - final_env = add_implementation_envs(loaded_env) + final_env = add_implementation_envs(loaded_env, app) if final_env is None: final_env = loaded_env