mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
extracted config.py to __init__.py
This commit is contained in:
parent
1c8d2c3a30
commit
2f2eb3689b
3 changed files with 26 additions and 24 deletions
9
pype/configurations/__init__.py
Normal file
9
pype/configurations/__init__.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from .lib import (
|
||||
system_configurations,
|
||||
project_configurations
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"system_configurations",
|
||||
"project_configurations"
|
||||
)
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
from .lib import (
|
||||
apply_overrides,
|
||||
default_configuration,
|
||||
studio_system_configurations,
|
||||
studio_project_configurations,
|
||||
project_configurations_overrides
|
||||
)
|
||||
|
||||
|
||||
def system_configurations():
|
||||
default_values = default_configuration()["system_configurations"]
|
||||
studio_values = studio_system_configurations()
|
||||
return apply_overrides(default_values, studio_values)
|
||||
|
||||
|
||||
def project_configurations(project_name):
|
||||
default_values = default_configuration()["project_configurations"]
|
||||
studio_values = studio_project_configurations()
|
||||
|
||||
studio_overrides = apply_overrides(default_values, studio_values)
|
||||
|
||||
project_overrides = project_configurations_overrides(project_name)
|
||||
|
||||
return apply_overrides(studio_overrides, project_overrides)
|
||||
|
|
@ -239,3 +239,20 @@ def apply_overrides(global_presets, project_overrides):
|
|||
if not project_overrides:
|
||||
return global_presets
|
||||
return merge_overrides(global_presets, project_overrides)
|
||||
|
||||
|
||||
def system_configurations():
|
||||
default_values = default_configuration()["system_configurations"]
|
||||
studio_values = studio_system_configurations()
|
||||
return apply_overrides(default_values, studio_values)
|
||||
|
||||
|
||||
def project_configurations(project_name):
|
||||
default_values = default_configuration()["project_configurations"]
|
||||
studio_values = studio_project_configurations()
|
||||
|
||||
studio_overrides = apply_overrides(default_values, studio_values)
|
||||
|
||||
project_overrides = project_configurations_overrides(project_name)
|
||||
|
||||
return apply_overrides(studio_overrides, project_overrides)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue