[Bf-python] WIP: Displaying Keypresses for VideoTuts

Martin Poirier theeth at yahoo.com
Thu Nov 15 19:16:21 CET 2007


I added support for loading the text from an external
file in the datadir.

Also, the code is much simplified by using a dict
instead of a series of if.

You'll want to put keymap.txt in your datadir
(./blender/scripts/bpydata)

I've mostly just taken a cleaned up text from the name
of the event, so that fill will have to be reworked a
bit.

Using an external file like that, it would be easy to
support multiple languages.

BTW, Circle select (BB) is not handled for the same
reason that hotkeys used during transformed aren't
handled. That is, the handlers are never called
because that code uses its own event processing loop.

Martin
PS: I've reformatted the event handler to use tabs, I
hope nobody minds (too much).

--- jmsoler at free.fr wrote:

> Selon Carsten Wartmann <cw at blenderbuch.de>:
> 
> > jmsoler at free.fr schrieb:
> > > Selon Carsten Wartmann <cw at blenderbuch.de>:
> > >
> > >> jmsoler at free.fr schrieb:
> > >>> I was very interested but absolutly no key had
> appeared.
> > >>> Could you post a copy of the screen ?
> > >> Did you activate the handlers in the View menu?
> I guess you always have
> > >> "Enable Script Links" set to on in the script
> buttons.
> > >>
> > >
> > > Excelent ! I love it !
> >
> > Thanks!
> >
> > The one quirk which nags me most (and prevents me
> from streamlining the
> > scripts) is that BorderSelect while in
> FaceSelectMode is not working
> > anymore. CircleSelect is working, BorderSelect in
> Edit- or ObjectMode
> > also, quite strange....
> >
> > It is something with the Blender.Redraw(), other
> Redraws() (e.g. from
> > Draw Module) are working with BorderSelect in FSM
> but then you get the
> > keypress shown AFTER for example a Popup shows (I
> always test with
> > CTRL-A)....
> >
> > Carsten
> 
> This is a modified version for french users.



      ____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keypress_draw.py
Type: application/octet-stream
Size: 1134 bytes
Desc: 4142601626-keypress_draw.py
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20071115/5d2352d1/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: keypress_event.py
Type: application/octet-stream
Size: 2930 bytes
Desc: 3541809320-keypress_event.py
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20071115/5d2352d1/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: keymap.txt
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20071115/5d2352d1/attachment.txt>


More information about the Bf-python mailing list