'Catching' handlers, modal catch-all handlers
Closed, ArchivedPublic


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.



Realize this is convenient, but its really a bit of a hack into our event system.

Would prefer if we add in changes to operators that they be a part of the a design, explain whats needed, why current modal handlers fail, then why this is a good solution.

Just having this patch for a handler isn't really convincing,
can you give some more background on what this solves?