add_camera_orientation_widget#

WidgetHelper.add_camera_orientation_widget(animate=True, n_frames=20)[source]#

Add a camera orientation widget to the active renderer.

Note

This widget requires vtk>=9.1.0.

Parameters
animatebool, optional

Enable or disable jump-to-axis-view animation.

n_framesint, optional

The number of frames to animate the jump-to-axis-viewpoint feature.

Returns
vtkCameraOrientationWidget

Camera orientation widget.

Examples

Add a camera orientation widget to the scene.

>>> import pyvista
>>> mesh = pyvista.Cube()
>>> plotter = pyvista.Plotter()
>>> _ = plotter.add_mesh(mesh, scalars=range(6), show_scalar_bar=False)
>>> _ = plotter.add_camera_orientation_widget()
>>> plotter.show()
../../../_images/pyvista-WidgetHelper-add_camera_orientation_widget-1_00_00.png