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
This commit is contained in:
Sergey Sharybin
2024-01-03 11:16:20 +01:00
committed by Sergey Sharybin
parent b66dec58ed
commit 46f3f53b16
@@ -683,7 +683,8 @@ void SCULPT_do_clay_thumb_brush(Sculpt *sd, Object *ob, Span<PBVHNode *> 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]);
}
});
}