diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-08 22:40:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-10-08 22:40:03 +0400 |
commit | 3ebd58673fb9a8c5ef13048b2e8e8a4cb7bb3a4e (patch) | |
tree | 81031f2772990c6292eafce955d09897a8e40d6f /source/blender/editors/screen/area.c | |
parent | e0c5e484732bb344fb845acc2678777e4bff1d5c (diff) |
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
Diffstat (limited to 'source/blender/editors/screen/area.c')
-rw-r--r-- | source/blender/editors/screen/area.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index fb782837d5e..f539020c93d 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -824,24 +824,24 @@ static void ed_default_handlers(wmWindowManager *wm, ListBase *handlers, int fla UI_add_region_handlers(handlers); } if(flag & ED_KEYMAP_VIEW2D) { - wmKeyMap *keymap= WM_keymap_find(wm, "View2D", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "View2D", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_MARKERS) { - wmKeyMap *keymap= WM_keymap_find(wm, "Markers", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Markers", 0, 0); WM_event_add_keymap_handler(handlers, keymap); // XXX need boundbox check urgently!!! } if(flag & ED_KEYMAP_ANIMATION) { - wmKeyMap *keymap= WM_keymap_find(wm, "Animation", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Animation", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_FRAMES) { - wmKeyMap *keymap= WM_keymap_find(wm, "Frames", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Frames", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } if(flag & ED_KEYMAP_GPENCIL) { - wmKeyMap *keymap= WM_keymap_find(wm, "Grease Pencil", 0, 0); + wmKeyMap *keymap= WM_keymap_find(wm->defaultconf, "Grease Pencil", 0, 0); WM_event_add_keymap_handler(handlers, keymap); } } @@ -1371,7 +1371,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_PANELS_UI, ar->winx, ar->winy); - keymap= WM_keymap_find(wm, "View2D Buttons List", 0, 0); + keymap= WM_keymap_find(wm->defaultconf, "View2D Buttons List", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); } |