[Bf-committers] I've made a custom hotkey system for Blender!
Ton Roosendaal
ton at blender.org
Mon Dec 6 10:21:48 CET 2004
Hi,
The plan is to make the Blender event system itself smarter, based on
dynamically added event handlers in a queue for each window. Once such
a system is in place, the full toolset in Blender can be in fact become
mappable. Python is being involved in such a restructure too, we'll
have to check on if that would be a good format for a hotkey mapping
file.
What you also should note is the event queues now are switch()-case
based, which works with constants only. Turning that into dynamic vars
will mean a rewrite of all queues into if()-else code. Or, if you
propose to map the 'AKEY' straight to another on ghostwinlay.c level?
That's dangerous.
My advise; nice to play with, but won't likely make in a bf-blender
release.
-Ton-
On 6 Dec, 2004, at 7:08, joeedh wrote:
> IF THIS IS NOT ALREADY BEING WORKED ON (don't you just hate all caps):
>
> I added a char keybinding[24][3] member to the user def struct. For
> each member of the array, [0] is the key code, [1] is NULL (because
> the UI expects null-terminated strings) and [2] is the qualifyer for
> it (such as shift, alt, whatever, based on the values in
> BKE_global.h).
>
> I did this for simpicity, and because I already have two new structs
> in my Blender DNA, one new Library block type, and I don't wish to
> further pollute the DNA code with even more structs.
>
> And I've written the UI for it, in the Themes buttons. Under the
> spacetype menu I've added a "keybinding" entry. Oh, and I've of
> course written the appropiate functions for it, for seeing if a
> particular hotkey has been pressed, etc.
>
> But before I start digging into the latest CVS download to redo all
> the hotkey calls (hopefully with LetterRip's help, since he kindly
> offered his assistance on IRC), I must know, Ton, if you hate my
> solution ;).
>
> Oh, each hotkey-pressed-tester function does a check on the hotkey to
> see if key[0] (the keycode) is equal to 0; if so, then it sets it to a
> default value. If you were wondering about backward compatibility.
>
> joeedh
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton at blender.org
http://www.blender.org
More information about the Bf-committers
mailing list