Im running into an issue here where im calling an operator from inside a handler registered at the bpy.app.handlers.depsgraph_update_pre() and bpy.app.handlers.depsgraph_post().
A quick look at the code makes this shine:
The view layer is being updated BEFORE and AFTER the CALL to the Operator in blender’s built-in code. The Before call to the update of the view layer makes further calls to the handlers registered as stated above.
My question is: is there a way to call an operator and bypass the layer update? what’s its reason of being?
I would rather not have to tweak blender’s python Core code yet.
Thanks in advance!
EDIT: Option (2) i have in mind is to remove the handler from inside the handler, calling the operator and then restoring back the handler but dont know if this is safe enough as it has to deal with the intrinsic features of Blender.
handlers =  for _ in range(len(bpy.app.handlers.depsgraph_update_pre)): handlers.append(bpy.app.handlers.depsgraph_update_pre.pop()) <...call to operator HERE...> for h in handlers: bpy.app.handlers.depsgraph_update_pre.append(h)
EDIT2: The operator i am trying to call within the handler does modify scene datablock contents hence the depsgraph.