Fix: Anchored, Line, Drag Dot stroke types do not support pen flip mode
While these modes do not use tablet pressure, they should still read event data so that the pen status is set correctly. Pull Request: https://projects.blender.org/blender/blender/pulls/129574
This commit is contained in:
@@ -1463,7 +1463,6 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
|
||||
bool first_dab = false;
|
||||
bool first_modal = false;
|
||||
bool redraw = false;
|
||||
float pressure;
|
||||
|
||||
if (event->type == INBETWEEN_MOUSEMOVE &&
|
||||
!image_paint_brush_type_require_inbetween_mouse_events(*br, mode))
|
||||
@@ -1472,9 +1471,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
|
||||
}
|
||||
|
||||
/* see if tablet affects event. Line, anchored and drag dot strokes do not support pressure */
|
||||
pressure = ((br->flag & (BRUSH_LINE | BRUSH_ANCHORED | BRUSH_DRAG_DOT)) ?
|
||||
1.0f :
|
||||
WM_event_tablet_data(event, &stroke->pen_flip, nullptr));
|
||||
const float tablet_pressure = WM_event_tablet_data(event, &stroke->pen_flip, nullptr);
|
||||
float pressure = ((br->flag & (BRUSH_LINE | BRUSH_ANCHORED | BRUSH_DRAG_DOT)) ? 1.0f :
|
||||
tablet_pressure);
|
||||
|
||||
/* When processing a timer event the pressure from the event is 0, so use the last valid
|
||||
* pressure. */
|
||||
|
||||
Reference in New Issue
Block a user