also pass Application object to add_implementation_envs

This commit is contained in:
iLLiCiTiT 2021-05-18 14:16:00 +02:00
parent 6690f4a88c
commit d43b3d1b2c
11 changed files with 12 additions and 12 deletions

View file

@ -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",

View file

@ -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(

View file

@ -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"

View file

@ -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 = [

View file

@ -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"]

View file

@ -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 = [

View file

@ -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 = [

View file

@ -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",

View file

@ -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"

View file

@ -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(

View file

@ -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