[vtkusers] mouse becomes inactive

sam2005.sam sam2005.sam at caramail.com
Thu May 26 09:15:00 EDT 2005


Dear VTK users,

I have a problem with the mouse
when I do a RemoveAllProps() followed
by a WindowRemap(): the mouse becomes
inactive. Despite this fact, the keyboard
default actions are still functional (ex: picking using "p" key...).


The python code is:

root = Tkinter.Tk()

child = Toplevel(root)
pane = vtk.vtkRenderWindow()
rw = vtkTkRenderWindowInteractor(child, width=300, height=360, rw=pane)
pane.Initialize()
ren = vtk.vtkRenderer()
pane.AddRenderer(ren)

#this functions draws an original molecule
molecule(rw, pn)

#at this point, the mouse works fine, allowing rotations, translations ...

#from a button, then the following code is invoked
ren.RemoveAllProps()
pane.WindowRemap()

#new drawings
atoms_assembly = vtk.vtkAssembly()
 .....
 .....
atoms_assembly.AddPart(atAktor)
 .....
 .....

ren.AddActor(atoms_assembly)
ren.SetBackground(0.,0.,0.)

#BUT now, the mouse becomes inactive

Thanks for help

Sam

Protek-on: CaraMail met en oeuvre un nouveau Concept de Sécurité Globale - www.caramail.com


More information about the vtkusers mailing list