[vtk-developers] setting AbortFlag from Python impossible?

Charl Botha c.p.botha at tudelft.nl
Thu Sep 20 06:28:24 EDT 2007


Dear all,

It seems that it's impossible for a Python observer to do SetAbortFlag
(in order to stop event processing), as the vtkCommand that's used (an
instance of vtkPythonCommand) is not accessible from Python.  I also
couldn't find any dirty workarounds for this... I would really
appreciate being told I'm wrong, because that would mean less work.

I would propose modifying the vtkPythonCommand::Execute() method so
that the return value of the Python observer is used to determine
whether event processing should stop or not.  If it returns a positive
value,  it means the event was handled and processing should stop.  If
it returns 0, it means that it wants other event handling to continue.

What do other people think?  Is there a work-around I somehow missed?
(searching on "vtk python AbortFlag" yields one irrelevant link over
here.

Thanks for any thoughts,
Charl



More information about the vtk-developers mailing list