pyvista / pyvista-support

[moved] Please head over to the Discussions tab of the PyVista repository
https://github.com/pyvista/pyvista/discussions
60 stars 4 forks source link

custom user interactions and 3D rotation disabling #300

Open neurochen opened 4 years ago

neurochen commented 4 years ago

Hi, thank you so much for this awesome package. We want to use pyvista in a custom application. Could you please let me know how to:

redefine user interactions. For example, a mouse left button drag will be used to move the entire scene in 2D or in a planar way. We tried to find how the mouse event is linked to its callbacks, without sorting it clearly. Could you please let me know how to disable the default callback and add another custom callback for mouse events? we also want to use pyvista for 2D plots, i.e. the view angle is fixed and there is no 3D rotations. We tried p.disable() and p.renderer.disable(). Both of them didn't work. Thanks.

lsawade commented 4 years ago

Looking for the same functionalities!

banesullivan commented 4 years ago

https://github.com/pyvista/pyvista/issues/1025 and https://github.com/pyvista/pyvista/issues/1022 outline this work as feature requests.

adamgranthendry commented 1 week ago

@neurochen Man from the future here (4 years later). You might want to try changing the RenderWindowInteractor (in pyvista, plotter.iren). There are several different styles now and I think enable_2d_style() would work for what you want.