Very simple patch that adds 'catching' handlers, which are simple modal handlers that are *always* executed for every event in "passive" mode, i.e. they can't control event processing flow with their return values.
This is mostly useful for event-inspecting add-ons and indeed exposed to python with the function "catching_handler_add" that works exactly like "modal_handler_add". Simply changing the function name makes it possible for the Operator to catch all events and react accordingly.
I realize this could be achieved with a solid listener/notifier infrastructure but it is a good and simple compromise for the time being. It also makes it very easy to understand as it integrates perfectly into the Operator architecture. |