feat: expose bl_implementations settings

This commit is contained in:
Swann Martinez
2019-08-28 18:58:18 +02:00
parent c90c347f74
commit 42f896b389
15 changed files with 115 additions and 144 deletions

View File

@ -15,28 +15,6 @@ THIRD_PARTY = os.path.join(os.path.dirname(os.path.abspath(__file__)), "libs")
CACHE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "cache")
PYTHON_PATH = None
SUBPROCESS_DIR = None
DEFAULT_CONFIG = {
"replicated_types": {
'Client': True,
'Image': True,
'Texture': True,
'Curve': True,
'Material': True,
'Light': True,
'SunLight': True,
'SpotLight': True,
'AreaLight': True,
'PointLight': True,
'Camera': True,
'Mesh': True,
'Armature': True,
'GreasePencil': True,
'Object': True,
'Action': True,
'Collection': True,
'Scene': True
}
}
ORDERED_TYPES = [
'Image',
@ -69,31 +47,7 @@ def load_config():
return yaml.safe_load(config_file)
except FileNotFoundError:
logger.info("no config")
return DEFAULT_CONFIG
def get_replicated_types():
config = load_config()
rtpyes = config["replicated_types"]
tlist = []
for t in ORDERED_TYPES:
if rtpyes[t]:
tlist.append(t)
return tlist
def genererate_replicated_types():
rtypes.clear()
cfg = load_config()
replicated_types = cfg['replicated_types']
for t in ORDERED_TYPES:
if replicated_types[t]:
rtypes.append(t)
return {}
def save_config(config):
import yaml