diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2021-07-27 21:50:26 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2021-08-05 21:08:36 +0300 |
commit | 4dd6c9ad450f773a4bfaaad2d54feee815399ce4 (patch) | |
tree | 455711d536d1746455baab9eb3a58f392786f768 /source | |
parent | 6844f7bedb71883f383bdeff130fd2200750cc54 (diff) |
Fix T90236: Sculpt automasking failing when the stroke does not start over the mesh
The active geometry element are usually updated by the cursor drawing
code (as they are needed for the cursor preview) and when an sculpt
operator starts. For brushes, this was not happening. This was making
brushes rely by default on the last cursor drawing update, which can
be incorrect if the mouse moved after starting the stroke without
hovering the active geometry.
Reviewed By: JacquesLucke
Maniphest Tasks: T90236
Differential Revision: https://developer.blender.org/D12045
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 83388c1aef2..8264affc465 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -7887,6 +7887,9 @@ static bool sculpt_stroke_test_start(bContext *C, struct wmOperator *op, const f sculpt_update_cache_invariants(C, sd, ss, op, mouse); + SculptCursorGeometryInfo sgi; + SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false); + SCULPT_undo_push_begin(ob, sculpt_tool_name(sd)); return true; |