changed global variables

This commit is contained in:
iLLiCiTiT 2020-08-21 16:10:24 +02:00
parent 1c47579334
commit 57cac7135d
2 changed files with 8 additions and 8 deletions

View file

@ -147,7 +147,7 @@ class StudioWidget(QtWidgets.QWidget, PypeConfigurationWidget):
origin_values.update(new_values)
output_path = os.path.join(
config.studio_presets_path, subpath
config.STUDIO_PRESETS_PATH, subpath
)
dirpath = os.path.dirname(output_path)
if not os.path.exists(dirpath):
@ -455,7 +455,7 @@ class ProjectWidget(QtWidgets.QWidget, PypeConfigurationWidget):
origin_values.update(new_values)
output_path = os.path.join(
config.project_presets_path, subpath
config.PROJECT_PRESETS_PATH, subpath
)
dirpath = os.path.dirname(output_path)
if not os.path.exists(dirpath):

View file

@ -11,13 +11,13 @@ os.environ["PYPE_PROJECT_CONFIGS"] = os.path.join(
log = logging.getLogger(__name__)
studio_presets_path = os.path.normpath(
STUDIO_PRESETS_PATH = os.path.normpath(
os.path.join(os.environ["PYPE_CONFIG"], "config", "studio_presets")
)
PROJECT_CONFIGURATION_DIR = "project_presets"
project_presets_path = os.path.normpath(
os.path.join(os.environ["PYPE_CONFIG"], "config", PROJECT_CONFIGURATION_DIR)
)
PROJECT_PRESETS_PATH = os.path.normpath(os.path.join(
os.environ["PYPE_CONFIG"], "config", PROJECT_CONFIGURATION_DIR
))
first_run = False
# TODO key popping not implemented yet
@ -135,11 +135,11 @@ def load_jsons_from_dir(path, *args, **kwargs):
def studio_presets(*args, **kwargs):
return load_jsons_from_dir(studio_presets_path, *args, **kwargs)
return load_jsons_from_dir(STUDIO_PRESETS_PATH, *args, **kwargs)
def global_project_presets(**kwargs):
return load_jsons_from_dir(project_presets_path, **kwargs)
return load_jsons_from_dir(PROJECT_PRESETS_PATH, **kwargs)
def path_to_project_overrides(project_name):