Backward fix for textured model viz in WebODM

pull/1233/head
Piero Toffanin 2021-02-25 13:10:04 -05:00
rodzic 208263c743
commit 28e89e7907
1 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -110,6 +110,15 @@ class ODMMvsTexStage(types.ODM_Stage):
'{nadirMode} '
'{labelingFile} '.format(**kwargs))
# Backward compatibility: copy odm_textured_model_geo.mtl to odm_textured_model.mtl
# for certain older WebODM clients which expect a odm_textured_model.mtl
# to be present for visualization
# We should remove this at some point in the future
geo_mtl = os.path.join(r['out_dir'], 'odm_textured_model_geo.mtl')
if io.file_exists(geo_mtl):
nongeo_mtl = os.path.join(r['out_dir'], 'odm_textured_model.mtl')
shutil.copy(geo_mtl, nongeo_mtl)
progress += progress_per_run
self.update_progress(progress)
else: