mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
start.py can use get_general_environments if is available
This commit is contained in:
parent
22876bbbde
commit
00ea737307
1 changed files with 12 additions and 5 deletions
17
start.py
17
start.py
|
|
@ -208,14 +208,21 @@ def set_openpype_global_environments() -> None:
|
|||
"""Set global OpenPype's environments."""
|
||||
import acre
|
||||
|
||||
from openpype.settings import get_environments
|
||||
try:
|
||||
from openpype.settings import get_general_environments
|
||||
|
||||
all_env = get_environments()
|
||||
general_env = get_general_environments()
|
||||
|
||||
except Exception:
|
||||
# Backwards compatibility for OpenPype versions where
|
||||
# `get_general_environments` does not exists yet
|
||||
from openpype.settings import get_environments
|
||||
|
||||
all_env = get_environments()
|
||||
general_env = all_env["global"]
|
||||
|
||||
# TODO Global environments will be stored in "general" settings so loading
|
||||
# will be modified and can be done in igniter.
|
||||
env = acre.merge(
|
||||
acre.parse(all_env["global"]),
|
||||
acre.parse(general_env),
|
||||
dict(os.environ)
|
||||
)
|
||||
os.environ.clear()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue