[Bf-committers] Keymap storage & management

Ton Roosendaal ton at blender.org
Mon Jul 11 17:51:23 CEST 2011


Hi,

Two weeks ago I reviewed with Brecht and Campbell how to fix up keymap  
handling in Blender. My time is still too scattered, so I've put it on  
Brecht's desk now. :)

Basically the idea is:

- maintain 4 independent "layers" of maps
- store all in memory outside WM or blender data, to keep file saves/ 
loads work.

Overview:
http://www.blender.org/bf/keymap.jpg

- The "Default" map is only generated on startup, with C code.
   We could try to keep this as lean as possible, not attempting to  
map everything
- The "Preset" map is not only to mimic other maps, but can be used  
for cases like "2.4 power user map" or "Optimal Laptop map" as well.  
This will be in our distros.
- The "Addon" map is just kept separate to prevent add-ons messing  
with stored defaults or presets. :)
- The "User" map is for everything else you want to save yourself  
using the keymap editor in Blender or via RMB on menus etc.

Currently, since the startup.blend holds everything (Screens, user  
prefs, addons, user keymaps), a "new" will also restore everything  
that was saved. That will be solved with another code project; to  
split up startup.blend in a layout file (screen configs) and usablity  
presets file(s).


-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute   Entrepotdok 57A  1018AD Amsterdam   The Netherlands



More information about the Bf-committers mailing list