mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
also pass Application object to add_implementation_envs
This commit is contained in:
parent
6690f4a88c
commit
d43b3d1b2c
11 changed files with 12 additions and 12 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
|
|
@ -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 = [
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue