From 46f3f53b16c4ae32e321b37be61b4969883c2d98 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 3 Jan 2024 11:16:20 +0100 Subject: [PATCH] Fix #115977: Regression: Sculpt: Clay Thumb brush extra offset The refactor in cf9fcbf24e used the wrong area coordinate for the clay brush: the original code used `ss->cache->location` as the `area_co` passed to the bush callback, and the new code after refactor used the `area_co` which was calculated as a displaced brush plane. The calculation of the displaced brush area plane as `area_co` seems to be unused, and reason for it is not really clear. This change only restores the `area_co` passed to the brush callback to the value it used to be prior to the refactor. Pull Request: https://projects.blender.org/blender/blender/pulls/116738 --- source/blender/editors/sculpt_paint/sculpt_brush_types.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/sculpt_paint/sculpt_brush_types.cc b/source/blender/editors/sculpt_paint/sculpt_brush_types.cc index e8bbf67fca6..663227f5db1 100644 --- a/source/blender/editors/sculpt_paint/sculpt_brush_types.cc +++ b/source/blender/editors/sculpt_paint/sculpt_brush_types.cc @@ -683,7 +683,8 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span nodes) threading::parallel_for(nodes.index_range(), 1, [&](const IndexRange range) { for (const int i : range) { - do_clay_thumb_brush_task(ob, brush, mat, area_no_sp, area_co, clay_strength, nodes[i]); + do_clay_thumb_brush_task( + ob, brush, mat, area_no_sp, ss->cache->location, clay_strength, nodes[i]); } }); }