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_nla
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_nla')
-rw-r--r--source/blender/editors/space_nla/nla_intern.h2
-rw-r--r--source/blender/editors/space_nla/nla_ops.c20
-rw-r--r--source/blender/editors/space_nla/space_nla.c10
3 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index e4557ec878f..91c1decc576 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -130,7 +130,7 @@ short nlaedit_is_tweakmode_on(bAnimContext *ac);
/* --- */
void nla_operatortypes(void);
-void nla_keymap(wmWindowManager *wm);
+void nla_keymap(wmKeyConfig *keyconf);
#endif /* ED_NLA_INTERN_H */
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 5ea2e99ad6a..6c940f32c24 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -167,7 +167,7 @@ void nla_operatortypes(void)
/* ************************** registration - keymaps **********************************/
-static void nla_keymap_channels (wmWindowManager *wm, wmKeyMap *keymap)
+static void nla_keymap_channels (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
/* NLA-specific (different to standard channels keymap) -------------------------- */
/* selection */
@@ -210,9 +210,9 @@ static void nla_keymap_channels (wmWindowManager *wm, wmKeyMap *keymap)
RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0)->ptr, "all", 1);
}
-static void nla_keymap_main (wmWindowManager *wm, wmKeyMap *keymap)
+static void nla_keymap_main (wmKeyConfig *keyconf, wmKeyMap *keymap)
{
- wmKeymapItem *kmi;
+ wmKeyMapItem *kmi;
/* selection */
/* click select */
@@ -277,17 +277,17 @@ static void nla_keymap_main (wmWindowManager *wm, wmKeyMap *keymap)
WM_keymap_add_item(keymap, "NLA_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0);
/* transform system */
- transform_keymap_for_space(wm, keymap, SPACE_NLA);
+ transform_keymap_for_space(keyconf, keymap, SPACE_NLA);
}
/* --------------- */
-void nla_keymap(wmWindowManager *wm)
+void nla_keymap(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
/* keymap for all regions */
- keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(keyconf, "NLA Generic", SPACE_NLA, 0);
WM_keymap_add_item(keymap, "NLA_OT_properties", NKEY, KM_PRESS, 0, 0);
/* channels */
@@ -297,11 +297,11 @@ void nla_keymap(wmWindowManager *wm)
*
* However, those operations which involve clicking on channels and/or the placement of them in the view are implemented here instead
*/
- keymap= WM_keymap_find(wm, "NLA Channels", SPACE_NLA, 0);
- nla_keymap_channels(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "NLA Channels", SPACE_NLA, 0);
+ nla_keymap_channels(keyconf, keymap);
/* data */
- keymap= WM_keymap_find(wm, "NLA Data", SPACE_NLA, 0);
- nla_keymap_main(wm, keymap);
+ keymap= WM_keymap_find(keyconf, "NLA Data", SPACE_NLA, 0);
+ nla_keymap_main(keyconf, keymap);
}
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 41435810889..32ff7766690 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -214,9 +214,9 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar)
/* own keymap */
// TODO: cannot use generic copy, need special NLA version
- keymap= WM_keymap_find(wm, "NLA Channels", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Channels", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
@@ -259,9 +259,9 @@ static void nla_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, "NLA Data", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Data", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
- keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
}
@@ -358,7 +358,7 @@ static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar)
ED_region_panels_init(wm, ar);
- keymap= WM_keymap_find(wm, "NLA Generic", SPACE_NLA, 0);
+ keymap= WM_keymap_find(wm->defaultconf, "NLA Generic", SPACE_NLA, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}