diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-10-15 17:55:06 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-10-15 17:55:06 +0400 |
commit | ef765b3606754bd639b48995900d01258c71f002 (patch) | |
tree | cbd26f1bccd41cf41c1788c81b715cf1283944f7 /source/blender/makesrna/intern/rna_wm.c | |
parent | 23612a8598bc4cb3ed3a21be6a9c181b8866112b (diff) |
Fix [#37077] User prefs > Input and Outliner Keymaps mismatch in representation.
Remove KeyMap mode from outliner, was an old half-finished features redondant with user preferences settings...
Also moved key map item's "event type to map type" and map type defines at WM level, this is too much generic to be at RNA level.
Also added a check in versionning code to convert all outdated outliner modes to a valid one (seems old 'verse' ones were not handled as well).
Thanks to Brecht for reviews and advices!
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index c6366745c55..dd338713d3e 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -442,13 +442,6 @@ EnumPropertyItem wm_report_items[] = { {0, NULL, 0, NULL, NULL} }; -#define KMI_TYPE_KEYBOARD 0 -#define KMI_TYPE_MOUSE 1 -#define KMI_TYPE_TWEAK 2 -#define KMI_TYPE_TEXTINPUT 3 -#define KMI_TYPE_TIMER 4 -#define KMI_TYPE_NDOF 5 - #ifdef RNA_RUNTIME #include <assert.h> @@ -625,13 +618,7 @@ static int rna_wmKeyMapItem_map_type_get(PointerRNA *ptr) { wmKeyMapItem *kmi = ptr->data; - if (ISTIMER(kmi->type)) return KMI_TYPE_TIMER; - if (ISKEYBOARD(kmi->type)) return KMI_TYPE_KEYBOARD; - if (ISTWEAK(kmi->type)) return KMI_TYPE_TWEAK; - if (ISMOUSE(kmi->type)) return KMI_TYPE_MOUSE; - if (ISNDOF(kmi->type)) return KMI_TYPE_NDOF; - if (kmi->type == KM_TEXTINPUT) return KMI_TYPE_TEXTINPUT; - return KMI_TYPE_KEYBOARD; + return WM_keymap_map_type_get(kmi); } static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value) |