enable_lightkit

Plotter.enable_lightkit(only_active=False)

Enable the default light-kit lighting.

See: https://www.researchgate.net/publication/2926068

This will replace all pre-existing lights in the renderer.

Parameters
only_activebool

If True, only change the active renderer. The default is that every renderer is affected.

Examples

Create a plotter without any lights and then enable the default light kit.

>>> import pyvista
>>> pl = pyvista.Plotter(lighting=None)
>>> pl.enable_lightkit()
>>> actor = pl.add_mesh(pyvista.Cube(), show_edges=True)
>>> pl.show()
../../../_images/pyvista-Plotter-enable_lightkit-1_00_00.png