forked from animate1978/MB-Lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
multiloading.py
36 lines (23 loc) · 961 Bytes
/
multiloading.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import bpy
import os
from . import algorithms as a
from . import settings as s
from pathlib import Path, PurePath
dr = s.data_path
def namesofallconfig(configtype, inproject="", seconddir=""): # lists all json files in a specified project
return namesofallfile("json", PurePath(inproject, configtype, seconddir))
def namesofallfile(thefiletype, thepath=s.data_path, filename="*"):
thepath = dr.glob(str(thepath) + '/' + filename + '.' + thefiletype)
return thepath
def filetypeexistin(configtype,thepath=s.data_path,filename="*.json"):
return
# TODO create projmodule config file reading?
'''
Would primarily be used to check that prerequisite projmods are installed stuff to allow for legacy versions to work
'''
# TODO projmod cache?
'''
Creates a JSON file that contains already indexed info. May allow for faster loading w/ big libraries.
Projmod config should be able to override this for testing purposes
Is not a priority
'''