Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-08 22:40:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-08 22:40:03 +0400
commit3ebd58673fb9a8c5ef13048b2e8e8a4cb7bb3a4e (patch)
tree81031f2772990c6292eafce955d09897a8e40d6f /source/blender/editors/space_graph
parente0c5e484732bb344fb845acc2678777e4bff1d5c (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_graph')
-rw-r--r--source/blender/editors/space_graph/graph_intern.h2
-rw-r--r--source/blender/editors/space_graph/graph_ops.c14
-rw-r--r--source/blender/editors/space_graph/space_graph.c10
3 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index 83a565e485f..9b7c2eb3656 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -159,7 +159,7 @@ int graphop_selected_fcurve_poll(struct bContext *C);
/* ***************************************** */
/* graph_ops.c */
-void graphedit_keymap(struct wmWindowManager *wm);
+void graphedit_keymap(struct wmKeyConfig *keyconf);
void graphedit_operatortypes(void);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index b82055064f8..ab35bda0e2f 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -141,9 +141,9 @@ void graphedit_operatortypes(void)
/* ************************** registration - keymaps **********************************/
-static void graphedit_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap)
+static void graphedit_keymap_keyframes (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* view */
WM_keymap_add_item(keymap, "GRAPH_OT_handles_view_toggle", HKEY, KM_PRESS, KM_CTRL, 0);
@@ -225,17 +225,17 @@ static void graphedit_keymap_keyframes (wmWindowManager *wm, wmKeyMap *keymap)
/* transform system */
- transform_keymap_for_space(wm, keymap, SPACE_IPO);
+ transform_keymap_for_space(keyconf, keymap, SPACE_IPO);
}
/* --------------- */
-void graphedit_keymap(wmWindowManager *wm)
+void graphedit_keymap(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(keyconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_keymap_add_item(keymap, "GRAPH_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
@@ -245,7 +245,7 @@ void graphedit_keymap(wmWindowManager *wm)
*/
/* keyframes */
- keymap= WM_keymap_find(wm, "GraphEdit Keys", SPACE_IPO, 0);
- graphedit_keymap_keyframes(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "GraphEdit Keys", SPACE_IPO, 0);
+ graphedit_keymap_keyframes(keyconf, keymap);
}
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index a7ea2294ed4..c8d2c571a16 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -208,9 +208,9 @@ static void graph_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, "GraphEdit Keys", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Keys", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -286,9 +286,9 @@ static void graph_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);
- keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -356,7 +356,7 @@ static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm, "GraphEdit Generic", SPACE_IPO, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "GraphEdit Generic", SPACE_IPO, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}