pyvista.Plotter.picked_cells

pyvista.Plotter.picked_cells#

property Plotter.picked_cells: None | UnstructuredGrid | MultiBlock[source]#

Return the cell-picked object.

This returns the object containing cells that were interactively picked with enable_cell_picking, enable_rectangle_through_picking or enable_rectangle_visible_picking.

Its value depends on the picking result:

  • if no cells have been picked, returns None

  • if all picked cells belong to a single actor, returns an UnstructuredGrid

  • if picked cells belong to multiple actors, returns a MultiBlock containing n pyvista.UnstructuredGrids, with n being the number of picked actors.

Note that a cell data original_cell_ids is added to help identifying cell ids picked from the original dataset.

Returns:
None | pyvista.UnstructuredGrid | pyvista.MultiBlock

Picked object if available.