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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-25 08:06:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-25 08:06:47 +0300
commit6d49b623e2efce59b58bb1295024ab8ac492370a (patch)
treeebe29d04b2e9730dfb4f7cd733e63e2676794dfc /source/blender/editors/sculpt_paint/paint_stroke.c
parent46587b3ccb0ec842500ce2c3f2359b78550aad0f (diff)
WM: space, region type filtering for paint cursor
Avoids calling poll on mouse-move for unrelated space/region types.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index af27ad5d307..a1ae32f2e9a 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -1201,8 +1201,10 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_FINISHED;
if (paint_supports_smooth_stroke(br, mode))
- stroke->stroke_cursor =
- WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_smooth_cursor, stroke);
+ stroke->stroke_cursor = WM_paint_cursor_activate(
+ CTX_wm_manager(C),
+ SPACE_TYPE_ANY, RGN_TYPE_ANY,
+ paint_poll, paint_draw_smooth_cursor, stroke);
stroke->stroke_init = true;
first_modal = true;
@@ -1220,8 +1222,10 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
stroke->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, stroke->brush->rate);
if (br->flag & BRUSH_LINE) {
- stroke->stroke_cursor =
- WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_line_cursor, stroke);
+ stroke->stroke_cursor = WM_paint_cursor_activate(
+ CTX_wm_manager(C),
+ SPACE_TYPE_ANY, RGN_TYPE_ANY,
+ paint_poll, paint_draw_line_cursor, stroke);
}
first_dab = true;