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:
authorCampbell Barton <ideasman42@gmail.com>2018-12-12 13:39:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-12 13:43:26 +0300
commit4357fb63db77d8bee9b1a3d10fdf6abd55e4c798 (patch)
tree477adefe8069f2e09d091086fbf4bfb2968878fd /source/blender/makesrna/intern/rna_wm.c
parentadaadb2fa0a4fde53f5f09bc05f6758926e71f44 (diff)
Keymap: event type filter w/ finding keymap items
Now its possibly to ask for only keyboard/mouse/ndof events when finding key map items.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 77a10e6dbbc..77b9d639fa7 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -406,6 +406,21 @@ const EnumPropertyItem rna_enum_keymap_propvalue_items[] = {
{0, NULL, 0, NULL, NULL}
};
+
+/* Mask event types used in keymap items. */
+const EnumPropertyItem rna_enum_event_type_mask_items[] = {
+ {EVT_TYPE_MASK_KEYBOARD_MODIFIER, "KEYBOARD_MODIFIER", 0, "Keyboard Modifier", ""},
+ {EVT_TYPE_MASK_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""},
+ {EVT_TYPE_MASK_MOUSE_WHEEL, "MOUSE_WHEEL", 0, "Mouse Wheel", ""},
+ {EVT_TYPE_MASK_MOUSE_GESTURE, "MOUSE_GESTURE", 0, "Mouse Gesture", ""},
+ {EVT_TYPE_MASK_MOUSE_BUTTON, "MOUSE_BUTTON", 0, "Mouse Button", ""},
+ {EVT_TYPE_MASK_MOUSE, "MOUSE", 0, "Mouse", ""},
+ {EVT_TYPE_MASK_NDOF, "NDOF", 0, "NDOF", ""},
+ {EVT_TYPE_MASK_TWEAK, "TWEAK", 0, "Tweak", ""},
+ {EVT_TYPE_MASK_ACTIONZONE, "ACTIONZONE", 0, "Action Zone", ""},
+ {0, NULL, 0, NULL, NULL}
+};
+
#if 0
static const EnumPropertyItem keymap_modifiers_items[] = {
{KM_ANY, "ANY", 0, "Any", ""},