node_kit/file_utils.py

12 lines
408 B
Python
Raw Permalink Normal View History

2024-11-06 11:26:28 +01:00
import plateform
from pathlib import Path
from os.path import expandvars
def get_cache_dir()
if plateform.system() == 'Linux':
return Path(expandvars('$HOME/.cache/blender'))
elif plateform.system() == 'Darwin':
return Path('/Library/Caches/Blender')
elif plateform.system() == 'Windows':
return Path(expandvars('%USERPROFILE%\AppData\Local\Blender Foundation\Blender'))