I’m working on an operator that does something that requires switching blender modes specifically from “edit” to “object” mode if the context is in edit. However if by chance this operator is invoked while a mesh operation is being done (like loop cut or bevel) attempting to switch causes blender to crash.
Is there a way to know at this current moment if it is safe to switch modes, or if some mesh operation is being done before attempting to switch?
I’ve been attempting a variety ways but none seem to be successful.
Any help is greatly appreciated.