diff --git a/nerfstudio/viewer/export_panel.py b/nerfstudio/viewer/export_panel.py index 76e054d5e..62a506fe4 100644 --- a/nerfstudio/viewer/export_panel.py +++ b/nerfstudio/viewer/export_panel.py @@ -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( diff --git a/nerfstudio/viewer/render_panel.py b/nerfstudio/viewer/render_panel.py index c5862b903..1c159dfa3 100644 --- a/nerfstudio/viewer/render_panel.py +++ b/nerfstudio/viewer/render_panel.py @@ -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)