diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-30 23:18:11 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-30 23:32:10 +0300 |
commit | 3090edfecfcea1ac379bbfc9499cb74551fffece (patch) | |
tree | bf6c842fc684fd53a7a26191916781885305f59d /source/blender/editors/sculpt_paint | |
parent | 4944167dee90cc66b12766a1da4d33a13abdb2af (diff) |
Cleanup: Use standard variable name for curve points
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc index 1ee43d98e6f..02ae89b41e6 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc @@ -144,21 +144,20 @@ class ExtrapolateCurvesEffect : public CurvesEffect { for (const int influence_i : range) { const int curve_i = curve_indices[influence_i]; const float move_distance_cu = move_distances_cu[influence_i]; - const IndexRange curve_points = curves.points_for_curve(curve_i); + const IndexRange points = curves.points_for_curve(curve_i); - if (curve_points.size() <= 1) { + if (points.size() <= 1) { continue; } - const float3 old_last_pos_cu = positions_cu[curve_points.last()]; + const float3 old_last_pos_cu = positions_cu[points.last()]; /* Use some point within the curve rather than the end point to smooth out some random * variation. */ - const float3 direction_reference_point = - positions_cu[curve_points[curve_points.size() / 2]]; + const float3 direction_reference_point = positions_cu[points[points.size() / 2]]; const float3 direction = math::normalize(old_last_pos_cu - direction_reference_point); const float3 new_last_pos_cu = old_last_pos_cu + direction * move_distance_cu; - move_last_point_and_resample(positions_cu.slice(curve_points), new_last_pos_cu); + move_last_point_and_resample(positions_cu.slice(points), new_last_pos_cu); } }); } |