lod differentiation

pre-gen commands
This commit is contained in:
Aaron Kimbre
2022-02-10 12:01:51 -06:00
parent ba0c4801df
commit 8646c40943
4 changed files with 74 additions and 23 deletions

View File

@@ -367,19 +367,13 @@ def prebuilt(content, file_format):
cache = f"app/cache/{filename}.{file_format}"
if os.path.exists(cache):
with open(cache, 'r') as file:
cache_data = file.read()
response = make_response(cache_data)
else:
if not os.path.exists(cache):
lxfml = f'app/luclient/res/BrickModels/{filename.split(".")[0]}.lxfml'
ldd.main(lxfml, cache.split('.')[0]) # convert to OBJ
if os.path.exists(cache):
with open(cache, 'r') as file:
cache_data = file.read()
response = make_response(cache_data)
with open(cache, 'r') as file:
cache_data = file.read()
response = make_response(cache_data)
else:
raise(Exception("INVALID FILE FORMAT"))