vedo icon indicating copy to clipboard operation
vedo copied to clipboard

Clicking and dragging meshes

Open DanKrsi opened this issue 8 months ago • 3 comments

Hi Marco,

I was wondering if there was a way to enable the panning of meshes (click and drag) withing a Plotter. I know that when you press 'a', the interactor style changes, and then this enables you to hold shift and drag objects. Is there a way to make it so that this is what happens, without having to press 'a' and then also hold shift?

Ideally, I would like to have a button that acts as a switch between style 1 (default) to style 2 (left click and drag results in panning of meshes)

DanKrsi avatar Oct 11 '23 19:10 DanKrsi

Hi @DanKrsi yes - it's in interactor_modes submodule check out the example in: https://github.com/marcomusy/vedo/blob/master/examples/basic/interaction_modes1.py

marcomusy avatar Oct 11 '23 20:10 marcomusy

Hi Marco,

Thanks for this, but I am looking to pan (translate) the individual meshes, not looking to pan the camera. In the same way that you do when you press 'a', then hold shift + click drag.

Thanks

DanKrsi avatar Oct 11 '23 21:10 DanKrsi

You can start with that interactor with eg: show(meshes, axes=1, mode="TrackballActor")

marcomusy avatar Oct 12 '23 00:10 marcomusy