[Bf-committers] Keybindings plan
Tom Musgrove
bf-committers@blender.org
Mon, 17 May 2004 17:12:39 +0000
Oky,
I've look through most of the code this weekend regarding keybindings. Here
is my current thoughts.
Long term, I'd like to switch to using a hash/dictionary instead of the
copiously sprinkled if statements.
The reason is multifold
1) We can create a test for the scope of a key combination without knowing
in advance what keybindings are used for what functions and in what scope.
Right now, you have to know where every keybinding combination can be used,
and check at each level of scope to make sure that the keybinding isn't in
scope for a lower level.
2) I'd expect a significant speed up. Right now, at each scope test, the
key combo has to run a guantlet of tests completely unrelated to the
functions it is bound to. This change would eliminate all of these tests
and instead only test for the functions specific to the key combo.
3) The code should be much cleaner
So, even if you absolutle hate the idea of custom keybindings, the above
reasons are adequate that the changes suggested should stand on their own
merit.
However, before I get to the above, first step is to seperate some unrelated
bits of code out to their own files. Toetes houses file saving functions,
global key binding functions, and bits of other stuff. Then switch to using
the #defines as outlined in my previous email.
Any comments or suggestions?
Tom M.
LetterRip
_________________________________________________________________
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com