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:
authorHans Goudey <h.goudey@me.com>2022-05-17 14:06:14 +0300
committerHans Goudey <h.goudey@me.com>2022-05-17 14:06:14 +0300
commited62b65474f007025bc19d1f8758257b12cbc8b3 (patch)
treeaf034e94cc54b9acfd0ecbc632eed19bee4956c3 /source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
parent3ad5510427002a299e6d6b1856da2f910a116a82 (diff)
Cleanup: Use const in curves sculpt code
This makes it much clearer what data is supposed to be modified and what data is just used to influence the operation. The new `BKE_paint_brush_for_read` function isn't great design, but it can be removed or renamed if similar changes are applied to more places. Also pass pointers explicitly to `sample_curves_3d_brush` rather than reusing the `bContext`. This makes it clearer what data the function actually needs. Differential Revision: https://developer.blender.org/D14967
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_ops.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index d8713c8eb1d..776da37205c 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -92,7 +92,7 @@ static std::unique_ptr<CurvesSculptStrokeOperation> start_brush_operation(bConte
case CURVES_SCULPT_TOOL_ADD:
return new_add_operation(C, op.reports);
case CURVES_SCULPT_TOOL_GROW_SHRINK:
- return new_grow_shrink_operation(mode, &C);
+ return new_grow_shrink_operation(mode, C);
}
BLI_assert_unreachable();
return {};
@@ -138,7 +138,7 @@ static void stroke_update_step(bContext *C,
}
if (op_data->operation) {
- op_data->operation->on_stroke_extended(C, stroke_extension);
+ op_data->operation->on_stroke_extended(*C, stroke_extension);
}
}