[vtkusers] ResetCamera() via 'r' Key - disable or manipulate?

Alex Malyushytskyy alexmalvtk at gmail.com
Fri Oct 19 17:53:03 EDT 2012


Look if  vtkInteractorStyleUser.can help you
http://www.vtk.org/doc/nightly/html/classvtkInteractorStyleUser.html

Alex


On Fri, Oct 19, 2012 at 3:16 AM, reppesis at gmail.com <reppesis at gmail.com> wrote:
> I semi-solved this by doing the following, but as you suspected: Some weird
> stuff happens when holding the 'r' key.
>
> renderer.AddObserver("ResetCameraEvent", PostResetCamera)
> def PostResetCamera(obj, event):
>     active_camera = obj.GetActiveCamera()
>     active_camera.Zoom(1.3)
>
> So after all I'd love to override OnChar() but I can't adapt the example
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/KeypressEvents to
> Python.
>
>



More information about the vtkusers mailing list