From 8fbb6aa4ece9c65afbcd5c5e1aa8d58baaa825b3 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Tue, 29 Sep 2020 23:21:50 +0200 Subject: Paint: Ignore inbetween events for anchored strokes When using anchored strokes, inbetween events are not needed since there is no stroke path to be reconstructed. Handling the inbewteen events are only producing unnecessary updates, creating performance issues. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D9053 --- source/blender/editors/sculpt_paint/paint_stroke.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c') diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 0df2d60e54f..ac1e5564f20 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -257,6 +257,10 @@ static bool paint_stroke_use_scene_spacing(Brush *brush, ePaintMode mode) static bool paint_tool_require_inbetween_mouse_events(Brush *brush, ePaintMode mode) { + if (brush->flag & BRUSH_ANCHORED) { + return false; + } + switch (mode) { case PAINT_MODE_SCULPT: if (ELEM(brush->sculpt_tool, -- cgit v1.2.3