[vtkusers] vtkRenderWindowInteractor with Python and VTK

David Gobbi dgobbi at irus.rri.ca
Fri Feb 1 09:51:01 EST 2002


Hi Marcelo,

You cannot use the vtkTkRenderWidget and a vtkRenderWindowInteractor in
the same application with Python, AFAIK.  Try controlling the interaction
via the vtkTkRenderWidget.

If you really need to use both, then you might be able to get it working
by using vtkInteractorStyleUser and doing something like the following:

def TimerCallback():
    root.update() # 'root' is your Tk root window

style.SetTimerMethod(TimerCallback)

This will hopefully make the RenderWindowInteractor cause Tkinter
to update on a regular basis.  This should be used instead of
calling 'root.mainloop()'.  Like usual, the iren.Start() must be
placed at the end of your application because iren.Start() will not
return until the application is finished.

If you manage to get this working, please email the list with your
results.

  - David

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Fri, 1 Feb 2002, Ailton Santa Barbara wrote:

>     Hello All,
>
>     I'm just beginning  with Python & VTK and I'm running into a problem
> with the vtkRenderWindowInteractor. I am using vtkRenderWidget to create
> the window to render into, but when I try to add a
> vtkRenderWindowInteractor, the vtkRenderWidget doesn't work with
> joystick interaction mode. What can I do to solve this problem???
>
>     Thank you...
>
>     Marcelo.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list