INNER CODE UNIT · Python
__init__
skarndev/umodel_tools · umodel_tools/asset_db.py:14
def __init__(self, db_root_path: str) -> None:
"""Initialize ``AssetDB``.
:param db_root_path: Asset root directory.
"""
self._version = 1
self._catalogs = {}
self._db_cats_path = os.path.join(db_root_path, 'blender_assets.cats.txt')
self._open_db(db_root_path)
def _open_db(self, db_root_path: str) -> None:
"""Open the asset catalog database or create one on disk if does not exist.
:param db_root_path: Asset root directory.
:raises NotImplementedError: Raised when an unknown value is met while parsing the DB.
"""
# create DB if not found