diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-01 10:39:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-01 10:40:52 +0300 |
commit | 07a6d4ed753e2ca0c8c4c64479ddafccde225921 (patch) | |
tree | 5ed8f40a46d968d3712efee761974729be90662b /source/blender/windowmanager | |
parent | bfa7586ba33bd090af13b8671326cdffd4c7592b (diff) |
WM: include tablet data in WM_event_print
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index b05c0818b31..1faede56196 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -566,10 +566,9 @@ void WM_event_print(const wmEvent *event) RNA_enum_identifier(event_type_items, event->type, &type_id); RNA_enum_identifier(event_value_items, event->val, &val_id); - printf("wmEvent type:%d / %s, val:%d / %s, \n" - " shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d, \n" - " mouse:(%d,%d), ascii:'%c', utf8:'%.*s', " - " keymap_idname:%s, pointer:%p\n", + printf("wmEvent type:%d / %s, val:%d / %s,\n" + " shift:%d, ctrl:%d, alt:%d, oskey:%d, keymodifier:%d,\n" + " mouse:(%d,%d), ascii:'%c', utf8:'%.*s', keymap_idname:%s, pointer:%p\n", event->type, type_id, event->val, val_id, event->shift, event->ctrl, event->alt, event->oskey, event->keymodifier, event->x, event->y, event->ascii, @@ -579,17 +578,19 @@ void WM_event_print(const wmEvent *event) if (ISNDOF(event->type)) { const wmNDOFMotionData *ndof = event->customdata; if (event->type == NDOF_MOTION) { - printf(" ndof: rot: (%.4f %.4f %.4f),\n" - " tx: (%.4f %.4f %.4f),\n" - " dt: %.4f, progress: %d\n", - UNPACK3(ndof->rvec), - UNPACK3(ndof->tvec), - ndof->dt, ndof->progress); + printf(" ndof: rot: (%.4f %.4f %.4f), tx: (%.4f %.4f %.4f), dt: %.4f, progress: %d\n", + UNPACK3(ndof->rvec), UNPACK3(ndof->tvec), ndof->dt, ndof->progress); } else { /* ndof buttons printed already */ } } + + if (event->tablet_data) { + const wmTabletData *wmtab = event->tablet_data; + printf(" tablet: active: %d, pressure %.4f, tilt: (%.4f %.4f)\n", + wmtab->Active, wmtab->Pressure, wmtab->Xtilt, wmtab->Ytilt); + } } else { printf("wmEvent - NULL\n"); |