Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Patches: Browse

[#26165] 'Catching' handlers, modal catch-all handlers

Date:
2011-02-21 17:07
Priority:
3
State:
Open
Submitted by:
Elia Sarti (vekoon)
Assigned to:
Nobody (None)
Category:
None
Group:
None
Resolution(Old, use status):
None
Resolution:
Patch for:
 
Summary:
'Catching' handlers, modal catch-all handlers
Detailed description
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.

Followup

No Followups Have Been Posted

 

Attached Files:

Name Date Download
catching_handlers.patch 2011-02-21 17:18 Download

Changes:

Field Old Value Date By
File Added15087: catching_handlers.patch2011-02-21 17:18vekoon
File Deleted15086: catching_handlers.patch2011-02-21 17:18vekoon
detailsVery simple patch that adds \'catching\' handlers, that are simple modal handlers that are *always* executed for every event in "passive" mode, i.e. they can\'t control even 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.2011-02-21 17:08vekoon
File Added15086: catching_handlers.patch2011-02-21 17:07vekoon