Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mikebind opened this issue Jun 8, 2020 · 0 comments

Comments

@mikebind
Copy link
Contributor

mikebind commented Jun 8, 2020

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()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant