diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 07:41:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 07:41:23 +0400 |
commit | 0f981edc990195c699eeb2c9f9544ed4eaba8b5e (patch) | |
tree | cd444d0c49f75cf434bc3a5711fd3e72974a5ca3 /source/blender/editors/gpencil | |
parent | 60e558393321edf4c8a41376c600981ae8636d24 (diff) |
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.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |