diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index 83f11a6b07..b95ba85fbe 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -1031,7 +1031,7 @@ def _merge_env(env, current_env): return result -def prepare_host_environments(data): +def prepare_host_environments(data, implementation_envs=True): """Modify launch environments based on launched app and context. Args: @@ -1090,7 +1090,8 @@ def prepare_host_environments(data): loaded_env = _merge_env(acre.compute(env_values), data["env"]) final_env = None - if app.host_name: + # + if app.host_name and implementation_envs: module = __import__("openpype.hosts", fromlist=[app.host_name]) host_module = getattr(module, app.host_name, None) add_implementation_envs = None @@ -1099,6 +1100,7 @@ def prepare_host_environments(data): host_module, "add_implementation_envs", None ) if add_implementation_envs: + # Function may only modify passed dict without returning value final_env = add_implementation_envs(loaded_env) if final_env is None: