mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-14 11:54:01 +08:00
adding check if camera_path_dir exists (#1319)
Co-authored-by: Matthew Tancik <tancik@berkeley.edu>
This commit is contained in:
1 parent
e73692e599
commit
f3b3a517e8
1 file changed
+8
-7
@@ -401,13 +401,14 @@ class ViewerState:
|
||||
trainer.save_checkpoint(step)
|
||||
# get all camera paths
|
||||
camera_path_dir = os.path.join(self.datapath, "camera_paths")
|
||||
camera_path_files = os.listdir(camera_path_dir)
|
||||
all_path_dict = {}
|
||||
for i in camera_path_files:
|
||||
if i[-4:] == "json":
|
||||
all_path_dict[i[:-5]] = load_from_json(Path(os.path.join(camera_path_dir, i)))
|
||||
self.vis["renderingState/all_camera_paths"].write(all_path_dict)
|
||||
self.vis["populate_paths_payload"].delete()
|
||||
if os.path.exists(camera_path_dir):
|
||||
camera_path_files = os.listdir(camera_path_dir)
|
||||
all_path_dict = {}
|
||||
for i in camera_path_files:
|
||||
if i[-4:] == "json":
|
||||
all_path_dict[i[:-5]] = load_from_json(Path(os.path.join(camera_path_dir, i)))
|
||||
self.vis["renderingState/all_camera_paths"].write(all_path_dict)
|
||||
self.vis["populate_paths_payload"].delete()
|
||||
|
||||
def _check_webrtc_offer(self):
|
||||
"""Check if there is a webrtc offer to respond to."""
|
||||
|
||||
Reference in new issue
Block a user