diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-22 06:22:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-22 06:29:06 +0300 |
commit | ed9273b08b9a6c0651f74ed9fe267d5ecf66d4c4 (patch) | |
tree | 44df612617d851b97468feb387b311df70ff404b /source/blender/makesrna/intern/rna_wm.c | |
parent | 350825ed99337adbb7e11021e6a4d9b31853bdb2 (diff) |
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.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 4 |
1 files changed, 3 insertions, 1 deletions
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}, }; |