mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
move the function above private functions
This commit is contained in:
parent
5e54ebcd03
commit
8b501187a4
1 changed files with 20 additions and 20 deletions
|
|
@ -237,26 +237,6 @@ def version(build):
|
||||||
print(os.environ["AYON_VERSION"])
|
print(os.environ["AYON_VERSION"])
|
||||||
|
|
||||||
|
|
||||||
def _set_global_environments() -> None:
|
|
||||||
"""Set global AYON environments."""
|
|
||||||
# First resolve general environment
|
|
||||||
general_env = parse_env_variables_structure(get_general_environments())
|
|
||||||
|
|
||||||
# Merge environments with current environments and update values
|
|
||||||
merged_env = merge_env_variables(
|
|
||||||
compute_env_variables_structure(general_env),
|
|
||||||
dict(os.environ)
|
|
||||||
)
|
|
||||||
env = compute_env_variables_structure(merged_env)
|
|
||||||
os.environ.clear()
|
|
||||||
os.environ.update(env)
|
|
||||||
|
|
||||||
# Hardcoded default values
|
|
||||||
# Change scale factor only if is not set
|
|
||||||
if "QT_AUTO_SCREEN_SCALE_FACTOR" not in os.environ:
|
|
||||||
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
|
|
||||||
|
|
||||||
|
|
||||||
@main_cli.command()
|
@main_cli.command()
|
||||||
@click.option(
|
@click.option(
|
||||||
"--project",
|
"--project",
|
||||||
|
|
@ -279,6 +259,26 @@ def createprojectstructure(
|
||||||
project_folders.create_project_folders(project)
|
project_folders.create_project_folders(project)
|
||||||
|
|
||||||
|
|
||||||
|
def _set_global_environments() -> None:
|
||||||
|
"""Set global AYON environments."""
|
||||||
|
# First resolve general environment
|
||||||
|
general_env = parse_env_variables_structure(get_general_environments())
|
||||||
|
|
||||||
|
# Merge environments with current environments and update values
|
||||||
|
merged_env = merge_env_variables(
|
||||||
|
compute_env_variables_structure(general_env),
|
||||||
|
dict(os.environ)
|
||||||
|
)
|
||||||
|
env = compute_env_variables_structure(merged_env)
|
||||||
|
os.environ.clear()
|
||||||
|
os.environ.update(env)
|
||||||
|
|
||||||
|
# Hardcoded default values
|
||||||
|
# Change scale factor only if is not set
|
||||||
|
if "QT_AUTO_SCREEN_SCALE_FACTOR" not in os.environ:
|
||||||
|
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
|
||||||
|
|
||||||
|
|
||||||
def _set_addons_environments(addons_manager):
|
def _set_addons_environments(addons_manager):
|
||||||
"""Set global environments for AYON addons."""
|
"""Set global environments for AYON addons."""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue