pyvista.Plotter.picked_cell

pyvista.Plotter.picked_cell#

property Plotter.picked_cell: 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.

Deprecated since version 0.47: Use the picked_cells attribute instead.

Returns:
None | pyvista.UnstructuredGrid | pyvista.MultiBlock

Picked object if available.