[Bf-python] Event handler (support key up/down)

Campbell Barton ideasman42 at gmail.com
Mon Mar 10 16:13:30 CET 2008


Hi, for crystalspace integration, caedes would like to be able to get
all events from an event handler - KeyUp and KeyDown,
This isn't that hard to add, however it means all existing event
handler scripts will also work this way.

In the attached patch there is Blender.value so you can check this for
key up/down.

Options are
- Possibly break existing scripts. (or at least run them twice for
each keypress)
- Do some trick with negative events (currently events are an unsigned
short), I dont like this at all, but it would at least not break any
existing scripts. very easy to implement.
- Add an argument for the event handler (wont break old scripts)  #
SPACEHANDLER.VIEW3D.EVENT -all
  Then we'd need to store the setting for each event handler.
- Add this in a branch (since apricot development may need to go in a
branch anyway)

- Cam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eventhandler.patch
Type: text/x-diff
Size: 3456 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20080310/bcb1cdea/attachment.patch>


More information about the Bf-python mailing list