From d2eb35c69472cff52790e82c3860df6b8dfab7d4 Mon Sep 17 00:00:00 2001 From: Jaswant Panchumarti Date: Thu, 5 Dec 2024 09:52:19 -0500 Subject: [PATCH] docs(examples): register camera orientation widget with vtk scene manager --- README.rst | 2 +- examples/vtk/widgets_camera.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 03281c7..dfaa2b2 100644 --- a/README.rst +++ b/README.rst @@ -70,7 +70,7 @@ Running examples # We need a VTK that has its wasm counterpart # This is the first version available with it # For ParaView (not yet supported), VTK don't need to be installed - pip install "vtk==9.3.20240810.dev0" --extra-index-url https://wheels.vtk.org + pip install "vtk==9.4.20241123.dev0" --extra-index-url https://wheels.vtk.org # regular trame app python ./examples/vtk/cone.py diff --git a/examples/vtk/widgets_camera.py b/examples/vtk/widgets_camera.py index 2fbdfc2..2fe16a6 100644 --- a/examples/vtk/widgets_camera.py +++ b/examples/vtk/widgets_camera.py @@ -68,7 +68,7 @@ def create_vtk_pipeline(path): ren_win.Render() - return ren_win + return ren_win, cam_orient_manipulator # ----------------------------------------------------------------------------- @@ -82,7 +82,7 @@ def __init__(self, server=None): self.server.cli.add_argument("--data") args, _ = self.server.cli.parse_known_args() - self.render_window = create_vtk_pipeline(args.data) + self.render_window, self.widget = create_vtk_pipeline(args.data) self.html_view = None self.ui = self._ui() @@ -94,6 +94,7 @@ def _ui(self): ): if WASM: self.html_view = vtklocal.LocalView(self.render_window) + self.widget_id = self.html_view.register_widget(self.widget) else: self.html_view = vtk_widgets.VtkRemoteView(self.render_window)