pyvista.Plotter.remove_all_lights#

Plotter.remove_all_lights(only_active=False)[source]#

Remove all lights from the scene.

Parameters:
only_activebool, default: False

If True, only remove lights from the active renderer. The default is that lights are stripped from every renderer.

Examples

Create a plotter and remove all lights after initialization. Note how the mesh rendered is completely flat

>>> import pyvista as pv
>>> plotter = pv.Plotter()
>>> plotter.remove_all_lights()
>>> plotter.renderer.lights
[]
>>> _ = plotter.add_mesh(pv.Sphere(), show_edges=True)
>>> plotter.show()
https://d33wubrfki0l68.cloudfront.net/d8d6f4168757ab10a2a7c6e5a1fb69ac8259db5b/8e0b4/_images/pyvista-plotter-remove_all_lights-1_00_00.png

Note how this differs from a plot with default lighting

>>> pv.Sphere().plot(show_edges=True, lighting=True)
https://d33wubrfki0l68.cloudfront.net/775ae7e0f85ab37fd827da692920254bba711e38/9e315/_images/pyvista-plotter-remove_all_lights-1_01_00.png