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/space_action | |
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/space_action')
-rw-r--r-- | source/blender/editors/space_action/action_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_action/action_ops.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index 4326bed62d3..c436475b537 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -124,7 +124,7 @@ enum { /* ***************************************** */ /* action_ops.c */ void action_operatortypes(void); -void action_keymap(struct wmWindowManager *wm); +void action_keymap(struct wmKeyConfig *keyconf); #endif /* ED_ACTION_INTERN_H */ diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index 00b22232608..ba504fa8a69 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -91,9 +91,9 @@ void action_operatortypes(void) /* ************************** registration - keymaps **********************************/ -static void action_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap) +static void action_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap) { - wmKeymapItem *kmi; + wmKeyMapItem *kmi; /* action_select.c - selection tools */ /* click-select */ @@ -156,7 +156,7 @@ static void action_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap) WM_keymap_add_item(keymap, "ACT_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); /* transform system */ - transform_keymap_for_space(wm, keymap, SPACE_ACTION); + transform_keymap_for_space(keyconf, keymap, SPACE_ACTION); /* test */ /* WM_keymap_add_item(keymap, "ACT_OT_test", QKEY, KM_PRESS, 0, 0); */ @@ -164,7 +164,7 @@ static void action_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap) /* --------------- */ -void action_keymap(wmWindowManager *wm) +void action_keymap(wmKeyConfig *keyconf) { wmKeyMap *keymap; @@ -175,7 +175,7 @@ void action_keymap(wmWindowManager *wm) */ /* keyframes */ - keymap= WM_keymap_find(wm, "Action_Keys", SPACE_ACTION, 0); - action_keymap_keyframes(wm, keymap); + keymap= WM_keymap_find(keyconf, "Action_Keys", SPACE_ACTION, 0); + action_keymap_keyframes(keyconf, keymap); } diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 3b275cab814..07de15a26b4 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -158,7 +158,7 @@ static void action_main_area_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_find(wm, "Action_Keys", SPACE_ACTION, 0); + keymap= WM_keymap_find(wm->defaultconf, "Action_Keys", SPACE_ACTION, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } @@ -221,7 +221,7 @@ static void action_channel_area_init(wmWindowManager *wm, ARegion *ar) UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy); /* own keymap */ - keymap= WM_keymap_find(wm, "Animation_Channels", 0, 0); + keymap= WM_keymap_find(wm->defaultconf, "Animation_Channels", 0, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } |