From ed9f7630342f4d515b6d77aa1f77722b74676518 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 21 Feb 2022 16:07:43 +0100 Subject: Paint: pass operator to stroke update function This allows accessing properties of the operator that the stroke belongs to. --- source/blender/editors/sculpt_paint/paint_stroke.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 ebb5db8d712..7c4623dd4b0 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -611,7 +611,7 @@ static void paint_brush_stroke_add_step( RNA_float_set(&itemptr, "x_tilt", stroke->x_tilt); RNA_float_set(&itemptr, "y_tilt", stroke->y_tilt); - stroke->update_step(C, stroke, &itemptr); + stroke->update_step(C, op, stroke, &itemptr); /* don't record this for now, it takes up a lot of memory when doing long * strokes with small brush size, and operators have register disabled */ @@ -1584,7 +1584,7 @@ int paint_stroke_exec(bContext *C, wmOperator *op, PaintStroke *stroke) if (stroke->stroke_started) { RNA_BEGIN (op->ptr, itemptr, "stroke") { - stroke->update_step(C, stroke, &itemptr); + stroke->update_step(C, op, stroke, &itemptr); } RNA_END; } -- cgit v1.2.3