mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
prepare_host_environments can not add implementation environments
This commit is contained in:
parent
a3e89486ad
commit
f8f64b5a05
1 changed files with 4 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue