Blender Kitsu: Shot Builder move config to standard directory #88

Merged
Nick Alberelli merged 1 commits from fix/shot-builder-config-directory into main 2023-06-19 16:31:16 +02:00
2 changed files with 4 additions and 2 deletions

View File

@ -200,7 +200,7 @@ configuration file is found. Project-specific settings are not configured/stored
but in this configuration file. but in this configuration file.
The add-on will look in the root of the production repository to locate the The add-on will look in the root of the production repository to locate the
main configuration file `shot-builder/config.py`. This file contains general main configuration file `config/shot-builder/config.py`. This file contains general
settings about the production, including: settings about the production, including:
* The name of the production for reporting back to the user when needed. * The name of the production for reporting back to the user when needed.

View File

@ -403,7 +403,9 @@ def ensure_loaded_production(context: bpy.types.Context) -> bool:
global _PRODUCTION global _PRODUCTION
addon_prefs = prefs.addon_prefs_get(bpy.context) addon_prefs = prefs.addon_prefs_get(bpy.context)
base_path = Path(addon_prefs.project_root_dir) base_path = Path(addon_prefs.project_root_dir)
production_root = os.path.join(base_path, "pro") #TODO Fix during refactor should use base_path production_root = os.path.join(
base_path, "pro", "config"
) # TODO Fix during refactor should use base_path
if is_valid_production_root(Path(production_root)): if is_valid_production_root(Path(production_root)):
logger.debug( logger.debug(
f"loading new production configuration from '{production_root}'.") f"loading new production configuration from '{production_root}'.")