Skip to content

Commit 310b5cd

Browse files
fix: Simplify calls
1 parent 95b7340 commit 310b5cd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

examples/00-basic-pyvista-examples/qt_backend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# pl = Plotter(backend=pv_backend)
5050
# pl.plot(cube)
5151
# pl.backend.enable_widgets()
52-
# pl.show()
52+
# pv_backend.scene.show()
5353

5454

5555
#####################
@@ -85,4 +85,4 @@
8585
# pv_backend.enable_widgets()
8686
#
8787
# # You can use this plotter in a Qt application
88-
# pl = pv_backend.pv_interface.scene
88+
# pl = pv_backend.scene

src/ansys/tools/visualization_interface/backends/pyvista/pyvista.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ def pv_interface(self) -> PyVistaInterface:
174174
"""PyVista interface."""
175175
return self._pl
176176

177+
@property
178+
def scene(self) -> pv.Plotter:
179+
"""PyVista scene."""
180+
return self._pl.scene
181+
177182
def enable_widgets(self):
178183
"""Enable the widgets for the plotter."""
179184
# Create Plotter widgets

0 commit comments

Comments
 (0)