[vtkusers] Problem with vtkRenderWindowInteractor with more than one widget

Charl Botha c.p.botha at tudelft.nl
Sat May 24 06:47:31 EDT 2008


On Fri, May 23, 2008 at 4:53 PM, Ken Evans <evans at aps.anl.gov> wrote:
>>> The real way to fix this would be to re-implement or
>>> subclass the interactor
>
> Yes.  It's too bad it can't be reimplemented in the original.  It seems a
> behavior such as with P would be a better interactor for everyone.  However,
> the lack of response indicates no one is likely to be taking on that task.

There's really no need to subclass anything.  You'll need to do some
more reading, but it's also possible to attach a new observer for
keyboard events and listen for the 'i' for example.  In the event
handler, use a vtkPropPicker to find out where the user is pointing.
Based on this information, select the correct interactor do what you
need to do.  You'lle obviously need to keep around some extra data
structures for this.

There really are a very few things that you cannot do with VTK from
Python.  You probably won't run into any of them soon (it took me a
few years, and I've solved some of them in the meanwhile).

Good luck with this,
Charl



More information about the vtkusers mailing list