GPv3: Soft mode for the Eraser tool #110310

Open
Amélie Fondevilla wants to merge 59 commits from amelief/blender:gpv3-erase-operator-soft-mode into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 1 additions and 6 deletions
Showing only changes of commit 027dd5eb56 - Show all commits

View File

@ -743,12 +743,7 @@ struct EraseOperationExecutor {
/* Write the opacity attribute*/
SpanAttributeWriter<float> dst_opacity = dst_attributes.lookup_or_add_for_write_span<float>(
opacity_attr, ATTR_DOMAIN_POINT);
threading::parallel_for(dst.points_range(), 256, [&](const IndexRange dst_points) {
for (const int dst_point : dst_points) {
dst_opacity.span[dst_point] = src_new_opacity[dst_point];
}
});
array_utils::gather(src_new_opacity.as_span(), dst_to_src_point.as_span(), dst_opacity.span);
dst_opacity.finish();
/* Note : the opacities were changed, so we still need to tag for changes. */