Make model about path used

This commit is contained in:
2024-05-07 22:49:09 +02:00
parent f9628eda0f
commit 649b19a33d
2 changed files with 33 additions and 3 deletions
+28
View File
@@ -0,0 +1,28 @@
import bpy
from pathlib import Path
class FangeProject:
def __init__(self):
self._pref = bpy.context.preferences.addons[__name__.split(".")[0]].preferences
self._project_path = Path(self._pref.project_path)
self._subdir_path = Path(self._pref.subdir_graph)
self._building_path = Path(self._pref.subdir_buildings)
self._props_path = Path(self._pref.subdir_props)
self._characters_path = Path(self._pref.subdir_characters)
@property
def buildings(self):
"""Get the buildings project path, on absolute"""
return self._project_path.joinpath(self._subdir_path, self._building_path)
@property
def props(self):
return self._project_path.joinpath(self._subdir_path, self._props_path)
@property
def characters(self):
return self._project_path.joinpath(self._subdir_path, self._characters_path)