Fix #127279: Various brushes do not work on multires
Introduced with 347ec1acd7.
Various brushes use the `calc_area_normal_and_center_node_grids`
function to determine their displacment. Prior to this commit, the
calculation of this plane normal was not iterating over the `IndexMask`
correctly.
This manifested on the default cube at multires levels greater than 6,
because at that point the number of PBVH nodes was greater than 1,
leading to the wrong nodes being used to calculate this effect.
Pull Request: https://projects.blender.org/blender/blender/pulls/127474
This commit is contained in:
@@ -2311,9 +2311,9 @@ void calc_area_normal_and_center(const Depsgraph &depsgraph,
|
||||
AreaNormalCenterData{},
|
||||
[&](const IndexRange range, AreaNormalCenterData anctd) {
|
||||
SampleLocalData &tls = all_tls.local();
|
||||
for (const int i : range) {
|
||||
node_mask.slice(range).foreach_index([&](const int i) {
|
||||
calc_area_normal_and_center_node_grids(ob, brush, true, true, nodes[i], tls, anctd);
|
||||
}
|
||||
});
|
||||
return anctd;
|
||||
},
|
||||
calc_area_normal_and_center_reduce);
|
||||
|
||||
Reference in New Issue
Block a user