PyVista trame menu ruler hides all objects from the scene on local rendering sometimes
MattTheCuber opened this issue · comments
Matthew Vine commented
Describe the bug, what's wrong, and what you expected.
If you add a PyVista plot to a trame layout with a menu, switch to local rendering, then toggle the ruler a few times (about the 5th time), it does not render the objects in the scene.
Steps to reproduce the bug.
import pyvista as pv
from pyvista.trame.ui import plotter_ui
from trame.app import get_server
from trame.ui.vuetify3 import SinglePageLayout
pv.start_xvfb()
pv.OFF_SCREEN = True
server = get_server(client_type="vue3")
state, ctrl = server.state, server.controller
plotter = pv.Plotter()
cube = pv.Cube()
cube_actor = plotter.add_mesh(cube, name="Cube")
with SinglePageLayout(server) as layout:
with layout.content:
view = plotter_ui(plotter, add_menu=True)
server.start()
System Information
--------------------------------------------------------------------------------
Date: Wed Mar 06 14:24:09 2024 EST
OS : Linux
CPU(s) : 32
Machine : x86_64
Architecture : 64bit
RAM : 125.8 GiB
Environment : Python
File system : ext4
GPU Vendor : Mesa/X.org
GPU Renderer : llvmpipe (LLVM 12.0.1, 256 bits)
GPU Version : 4.5 (Core Profile) Mesa 21.1.5
MathText Support : True
Python 3.11.6 (main, Nov 2 2023, 14:08:07) [GCC 8.5.0 20210514 (Red Hat
8.5.0-4)]
pyvista : 0.43.3
vtk : 9.3.0
numpy : 1.26.4
matplotlib : 3.8.3
scooby : 0.9.2
pooch : 1.8.1
pillow : 10.2.0
imageio : 2.31.6
PyQt5 : 5.15.10
IPython : 8.17.2
colorcet : 3.0.1
cmocean : 3.0.3
ipywidgets : 8.1.1
scipy : 1.11.3
tqdm : 4.63.1
meshio : 5.3.4
jupyterlab : 4.1.3
trame : 3.5.2
trame_client : 2.16.2
trame_server : 2.17.2
trame_vtk : 2.8.5
trame_vuetify : 2.4.2
jupyter_server_proxy : 4.1.0
nest_asyncio : 1.5.8
--------------------------------------------------------------------------------
Screenshots
chrome_Oyd4YZHgJQ.mp4
Sebastien Jourdain (Kitware) commented
Arg, that is because the state goes out of sync... I'm expecting VTK/WASM local rendering to actually fix such issue.