mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
viser notification api changes
This commit is contained in:
1 parent
2f98a97fc1
commit
44ae194ba9
2 files changed
+64
-56
No files matched your search
@@ -129,13 +129,14 @@ def populate_point_cloud_tab(
|
||||
@export_button.on_click
|
||||
def _(event: viser.GuiEvent) -> None:
|
||||
assert event.client is not None
|
||||
server.add_notification(
|
||||
title="Exporting point cloud",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Exporting point cloud",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
from nerfstudio.scripts.exporter import ExportPointCloud
|
||||
|
||||
@@ -157,13 +158,14 @@ def populate_point_cloud_tab(
|
||||
|
||||
if export.complete:
|
||||
server.clear_notification()
|
||||
server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
else:
|
||||
server.add_gui_markdown(
|
||||
@@ -205,13 +207,14 @@ def populate_mesh_tab(
|
||||
@export_button.on_click
|
||||
def _(event: viser.GuiEvent) -> None:
|
||||
assert event.client is not None
|
||||
server.add_notification(
|
||||
title="Exporting poisson mesh",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Exporting poisson mesh",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
from nerfstudio.scripts.exporter import ExportPoissonMesh
|
||||
|
||||
@@ -234,13 +237,14 @@ def populate_mesh_tab(
|
||||
|
||||
if export.complete:
|
||||
server.clear_notification()
|
||||
server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
else:
|
||||
server.add_gui_markdown(
|
||||
@@ -266,13 +270,14 @@ def populate_splat_tab(
|
||||
@export_button.on_click
|
||||
def _(event: viser.GuiEvent) -> None:
|
||||
assert event.client is not None
|
||||
server.add_notification(
|
||||
title="Exporting gaussian splat",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Exporting gaussian splat",
|
||||
body="File will be saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
from nerfstudio.scripts.exporter import ExportGaussianSplat
|
||||
|
||||
@@ -290,13 +295,14 @@ def populate_splat_tab(
|
||||
|
||||
if export.complete:
|
||||
server.clear_notification()
|
||||
server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Export complete!",
|
||||
body="File saved under " + str(output_dir.value),
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
else:
|
||||
server.add_gui_markdown(
|
||||
|
||||
@@ -1123,13 +1123,14 @@ def populate_render_tab(
|
||||
def _(event: viser.GuiEvent) -> None:
|
||||
assert event.client is not None
|
||||
render_path = f"""renders/{datapath.name}/{render_name_text.value}.mp4"""
|
||||
server.add_notification(
|
||||
title="Rendering trajectory",
|
||||
body="Saving rendered video as " + render_path,
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Rendering trajectory",
|
||||
body="Saving rendered video as " + render_path,
|
||||
withCloseButton=True,
|
||||
loading=True,
|
||||
autoClose=False,
|
||||
)
|
||||
notif.show()
|
||||
num_frames = int(framerate_number.value * duration_number.value)
|
||||
json_data = {}
|
||||
|
||||
@@ -1245,13 +1246,14 @@ def populate_render_tab(
|
||||
|
||||
if render.complete:
|
||||
server.clear_notification()
|
||||
server.add_notification(
|
||||
title="Render complete!",
|
||||
body="Video saved as " + render_path,
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif = server.add_notification(
|
||||
title="Render complete!",
|
||||
body="Video saved as " + render_path,
|
||||
withCloseButton=True,
|
||||
loading=False,
|
||||
autoClose=5000,
|
||||
)
|
||||
notif.show()
|
||||
|
||||
if control_panel is not None:
|
||||
camera_path = CameraPath(server, duration_number, control_panel._time_enabled)
|
||||
|
||||
Reference in new issue
Block a user