pyvista.RenderWindowInteractor.enable_interactor_style

pyvista.RenderWindowInteractor.enable_interactor_style#

RenderWindowInteractor.enable_interactor_style(style: str | None = None) None[source]#

Set the interactive style to a built-in or registered mode.

Parameters:
stylestr, optional

Name of the interactor style to enable. Built-in styles use names that mirror the public enable_*_style methods, such as 'terrain_style'. If None, use the current plotter theme’s interactor_style or the global theme when no plotter is attached.

Raises:
TypeError

If the registered handler does not resolve to an interactor style instance.

ValueError

If the style name is not known.

Examples

Enable a built-in interactor style by name.

>>> import pyvista as pv
>>> pl = pv.Plotter()
>>> pl.enable_interactor_style('terrain_style')