mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
configurations lib has constant path to defaults
This commit is contained in:
parent
72221cfafd
commit
3cd46bb0f2
1 changed files with 4 additions and 3 deletions
|
|
@ -29,6 +29,9 @@ STUDIO_PROJECT_OVERRIDES_PATH = os.path.join(
|
|||
STUDIO_OVERRIDES_PATH, "project_overrides"
|
||||
)
|
||||
|
||||
# Path to default configurations
|
||||
DEFAULTS_DIR = os.path.join(os.path.dirname(__file__), "defaults")
|
||||
|
||||
# Variable where cache of default configurations are stored
|
||||
_DEFAULT_CONFIGURATIONS = None
|
||||
|
||||
|
|
@ -36,9 +39,7 @@ _DEFAULT_CONFIGURATIONS = None
|
|||
def default_configuration():
|
||||
global _DEFAULT_CONFIGURATIONS
|
||||
if _DEFAULT_CONFIGURATIONS is None:
|
||||
current_dir = os.path.dirname(__file__)
|
||||
defaults_path = os.path.join(current_dir, "defaults")
|
||||
_DEFAULT_CONFIGURATIONS = load_jsons_from_dir(defaults_path)
|
||||
_DEFAULT_CONFIGURATIONS = load_jsons_from_dir(DEFAULTS_DIR)
|
||||
return _DEFAULT_CONFIGURATIONS
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue