Cleanup: Sculpt: Remove unused vertex indices argument
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user