Custom Context function toolOffCleanup()


#1

The function toolOffCleanup() seem not execute when I change the context(i.e. select other context). However, the MPxContext class said function toolOffCleanup() will execute when deactive the context. I have tested the toolOnSetup(), and this function will execute when set the custom context be the current context.
I just add a toolOffCleanup() in the maya plugin HelixTool() to test this function.
However, the method toolOffCleanup() of class MPxSelectionContext will execute, but I just want to create a context derived from the class MPxContext.
Please forgive my English:grinning:
Thanks for help!


#2

I know why:joy:. Just add a parameter to the toolOffCleanUp() which make this function do not execute, because this function is virtual function.