From ed9273b08b9a6c0651f74ed9fe267d5ecf66d4c4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 May 2019 13:22:45 +1000 Subject: Fix T63852: Invalid keymaps written Track-pad & NDOF events were using KM_NOTHING which wasn't included in the RNA enum, causing the value to be an empty string in exported key-map (which then failed to load back). Add back 'Nothing' value, keep it last since it's not used often. --- source/blender/makesrna/intern/rna_wm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_wm.c') diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 4a19dab9180..14994340ad3 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -49,6 +49,8 @@ static const EnumPropertyItem event_keymouse_value_items[] = { {KM_CLICK, "CLICK", 0, "Click", ""}, {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""}, {KM_CLICK_DRAG, "CLICK_DRAG", 0, "Click Drag", ""}, + /* Used for NDOF and trackpad events. */ + {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, {0, NULL, 0, NULL, NULL}, }; @@ -382,7 +384,6 @@ const EnumPropertyItem rna_enum_event_type_items[] = { const EnumPropertyItem rna_enum_event_value_items[] = { {KM_ANY, "ANY", 0, "Any", ""}, - {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, {KM_PRESS, "PRESS", 0, "Press", ""}, {KM_RELEASE, "RELEASE", 0, "Release", ""}, {KM_CLICK, "CLICK", 0, "Click", ""}, @@ -396,6 +397,7 @@ const EnumPropertyItem rna_enum_event_value_items[] = { {EVT_GESTURE_SW, "SOUTH_WEST", 0, "South-West", ""}, {EVT_GESTURE_W, "WEST", 0, "West", ""}, {EVT_GESTURE_NW, "NORTH_WEST", 0, "North-West", ""}, + {KM_NOTHING, "NOTHING", 0, "Nothing", ""}, {0, NULL, 0, NULL, NULL}, }; -- cgit v1.2.3