Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-10 18:54:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2020-01-21 14:22:24 +0300
commitca4e8b423e81f2a72cd5409d1c2c0450e12afc78 (patch)
treef6bcd8f872cb0e9845ef1efc7973ee62ca7d5713 /source/blender/editors/curve
parentf10d190240a135f4e26058eb49a787f9178ceb71 (diff)
Cleanup: simplify wmEvent tablet data storage and naming
Removing meaningless distinction between NULL pointer and EVT_TABLET_NONE, and initialize pressure and tilt to 1.0 and 0.0 respectively when no tablet is used.
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r--source/blender/editors/curve/editcurve_paint.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 4c4bac6a249..5486d60d5d7 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -460,14 +460,8 @@ static void curve_draw_event_add(wmOperator *op, const wmEvent *event)
ARRAY_SET_ITEMS(selem->mval, event->mval[0], event->mval[1]);
- /* handle pressure sensitivity (which is supplied by tablets) */
- if (event->tablet_data) {
- const wmTabletData *wmtab = event->tablet_data;
- selem->pressure = wmtab->Pressure;
- }
- else {
- selem->pressure = 1.0f;
- }
+ /* handle pressure sensitivity (which is supplied by tablets or otherwise 1.0) */
+ selem->pressure = event->tablet.pressure;
bool is_depth_found = stroke_elem_project_fallback_elem(
cdd, cdd->prev.location_world_valid, selem);