Cleanup: Sculpt: Remove unused vertex indices argument

This commit is contained in:
Hans Goudey
2024-06-14 19:38:51 -04:00
parent 97962a3b21
commit baf84f1ec9
10 changed files with 10 additions and 13 deletions

View File

@@ -63,7 +63,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -84,7 +84,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -65,7 +65,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -64,7 +64,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -71,7 +71,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -85,7 +85,7 @@ static void calc_faces(const Brush &brush,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -65,7 +65,7 @@ static void calc_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -130,7 +130,7 @@ BLI_NOINLINE static void apply_positions_faces(const Sculpt &sd,
const MutableSpan<float> distances = tls.distances;
calc_distance_falloff(
ss, positions_eval, verts, eBrushFalloffShape(brush.falloff_shape), distances, factors);
calc_brush_strength_factors(ss, brush, verts, distances, factors);
calc_brush_strength_factors(ss, brush, distances, factors);
if (ss.cache->automasking) {
auto_mask::calc_vert_factors(object, *ss.cache->automasking, node, verts, factors);

View File

@@ -88,7 +88,6 @@ void calc_distance_falloff(SculptSession &ss,
*/
void calc_brush_strength_factors(const SculptSession &ss,
const Brush &brush,
Span<int> vert_indices,
Span<float> distances,
MutableSpan<float> factors);

View File

@@ -6594,16 +6594,14 @@ void calc_distance_falloff(SculptSession &ss,
void calc_brush_strength_factors(const SculptSession &ss,
const Brush &brush,
const Span<int> verts,
const Span<float> distances,
const MutableSpan<float> factors)
{
BLI_assert(verts.size() == distances.size());
BLI_assert(verts.size() == factors.size());
BLI_assert(factors.size() == distances.size());
const StrokeCache &cache = *ss.cache;
for (const int i : verts.index_range()) {
for (const int i : factors.index_range()) {
if (factors[i] == 0.0f) {
/* Skip already masked-out points, as they might be outside of the brush radius and be
* unaffected anyway. Having such large values in the calculations below might lead to