Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add disable picking #2450

Merged
merged 4 commits into from
Apr 15, 2022
Merged

add disable picking #2450

merged 4 commits into from
Apr 15, 2022

Conversation

akaszynski
Copy link
Member

Resolve #1069 by adding a method to PickingHelper to disable picking.

Example usage:

import pyvista as pv
mesh = pv.Sphere(center=(1, 0, 0))
cube = pv.Cube()
pl = pv.Plotter()
_ = pl.add_mesh(mesh)
_ = pl.add_mesh(cube)
_ = pl.enable_mesh_picking(left_clicking=False)

# or
# _ = pl.enable_surface_picking(left_clicking=True)
# _ = pl.enable_point_picking(left_clicking=True)

pl.disable_picking()
pl.show()

@github-actions github-actions bot added the enhancement Changes that enhance the library label Apr 10, 2022
@codecov
Copy link

codecov bot commented Apr 11, 2022

Codecov Report

Merging #2450 (3613f24) into main (67984ea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2450   +/-   ##
=======================================
  Coverage   93.64%   93.65%           
=======================================
  Files          74       74           
  Lines       16002    16016   +14     
=======================================
+ Hits        14985    14999   +14     
  Misses       1017     1017           

tests/test_picking.py Outdated Show resolved Hide resolved
@akaszynski akaszynski merged commit 17ed849 into main Apr 15, 2022
@akaszynski akaszynski deleted the feat/disable_picking branch April 15, 2022 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable Point_picking
2 participants