[vtkusers] Aborting observers in python
David Gobbi
david.gobbi at gmail.com
Thu Sep 22 11:59:55 EDT 2011
Hi Wayne,
Around a year ago I did a little bit of work on improving vtkCommand
in python, but it has been low priority. It might be possible to
access a command object in python if you are willing to play with the
VTK source code a bit.
In Wrapping/vtkWrapPython.c remove the following line and recompile VTK:
3090: (strcmp(theFunc->Name, "GetCommand") == 0) ||
Then try adding an observer in python and retrieving the command object:
commandID = obj.AddObserver(eventID, callback)
command = obj.GetCommand(commandID)
If this works for you, then let me know.
- David
On Wed, Sep 21, 2011 at 4:12 PM, Wayne Christopher <wayne at 4raccoons.com> wrote:
> I saw a discussion from a few years ago -
> http://www.vtk.org/pipermail/vtk-developers/2007-September/004725.html -
> about setting the abort flag in an observer to prevent further observers
> from being fired with the python bindings.
>
> Has anything been done about this? I couldn't quite tell from the
> discussion whether there was a workaround or not.
>
> Thanks,
>
> Wayne
More information about the vtkusers
mailing list