From 0f981edc990195c699eeb2c9f9544ed4eaba8b5e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Jan 2013 03:41:23 +0000 Subject: fix airbrush + tablet pressure bug. Timer events used by the airbrush would always give a pressure of 1.0, ignoring the tablets real pressure in all paint modes. Move tablet data into its own struct-member so it can be used with timer events. --- source/blender/editors/gpencil/gpencil_paint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index c40312758fc..41ef4bd0b95 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1564,8 +1564,8 @@ static void gpencil_draw_apply_event(wmOperator *op, wmEvent *event) p->curtime = PIL_check_seconds_timer(); /* handle pressure sensitivity (which is supplied by tablets) */ - if (event->custom == EVT_DATA_TABLET) { - wmTabletData *wmtab = event->customdata; + if (event->tablet_data) { + wmTabletData *wmtab = event->tablet_data; tablet = (wmtab->Active != EVT_TABLET_NONE); p->pressure = wmtab->Pressure; -- cgit v1.2.3