Move cache_dir from site-packages to local folder (#5856)

Previously cache_dir was located under site-packages, which is managed
by blender and could be read-only. Now location defaults to eg.
~/.cache/bonsai or equivalent location on other platforms. See #5564

Note this adds a dependency on the platformdirs python module
This commit is contained in:
Bruno Postle
2025-01-20 08:14:51 +00:00
committed by GitHub
parent ebdfe2bccd
commit 13b93a9ea8
9 changed files with 39 additions and 5 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class TestLoadExpress(NewFile):
class TestPurgeHdf5Cache(NewFile):
def test_run(self):
cache_dir = Path(bpy.context.scene.BIMProperties.data_dir) / "cache"
cache_dir = Path(bpy.context.scene.BIMProperties.cache_dir)
test_file = cache_dir / "test.h5"
test_file.parent.mkdir(parents=True, exist_ok=True)
test_file.touch()