[vtkusers] interactor styles with vtkTkRenderWindowInteractor.py

Reinhold Niesner r.niesner at tu-bs.de
Mon Jan 9 10:57:35 EST 2006


Dear vtk users, 
 
I'm experimenting a bit with interactor styles using Python.
I'm experiencing a weird behavior when trying to switch the interactor
style for vtkTkRenderWindowInteractor, like this:
 
pane = vtkTkRenderWindowInteractor(.)
#...
style = vtk.vtkInteractorStyleTrackballCamera()
pane.oldStyle = pane._Iren.GetInteractorStyle()     # <-----------------
!!!
pane._Iren.SetInteractorStyle(style)
 
 
Apparently, if the old style isn't being deleted, then both styles are
somehow active, superposed.
What I want is to be able to switch between the styles, back and forth.
Does anyone know how to do this?
I have appended a modified version of vtkTkRenderWindowInteractor.py, to
illustrate this. Press "x" to modify the style.
Any help greatly appreciated.
 
Reinhold
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060109/491e31ff/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkTkRenderWindowInteractor.test.py
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060109/491e31ff/attachment.txt>


More information about the vtkusers mailing list