Skip to content

SegmentModified event is not properly cleaned up when SurfaceCut is used from another module #34

@mikebind

Description

@mikebind

When the SurfaceCut tool is used from a python script, after effect.self().onApply() is called, the segmentation is still observed for SegmentModified events. I think this is because the deactivate() function, which would normally remove the observer, is not called when not using the GUI. Removing the observer (via self.observeSegmentation(False) ) in onApply() would work for outside scripts like mine, but would cause problems for GUI users of the SurfaceCut effect. I'm not sure of the best way to to modify the SurfaceCut code to remove the observer just for non-GUI uses of the tool. Now that I am aware of the problem, I add a call to effect.self().observeSegmentation(False) right after effect.self().onApply(), but it seems like the effect might be able to do a better job of cleaning up after itself. Or does it make sense to ask the user to run effect.self().deactivate() after running effect.self().onApply()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions