diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-24 07:01:02 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-24 07:05:46 +0300 |
commit | e253f9f66d6f63592ffd97afe207ef7c72547d03 (patch) | |
tree | 9a9345ab1184f0f6fda51740967595cc2f52a4bf /source/blender/editors/sculpt_paint/curves_sculpt_ops.cc | |
parent | a1598d6835d0c579579881bca900f9259b26d11a (diff) |
Cleanup: Adjust naming in new curves code
Rename "size" variables and functions to use "num" instead,
based on T85728 (though this doesn't apply to simple C++
containers, it applies here). Rename "range" to "points" in
some functions, so be more specific.
Differential Revision: https://developer.blender.org/D14431
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_ops.cc')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_ops.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc index b9a019a012c..94d31e1985d 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc @@ -117,7 +117,7 @@ class ShrinkOperation : public CurvesSculptStrokeOperation { threading::parallel_for(curves.curves_range(), 256, [&](const IndexRange curves_range) { for (const int curve_i : curves_range) { - const IndexRange curve_points = curves.range_for_curve(curve_i); + const IndexRange curve_points = curves.points_for_curve(curve_i); const int last_point_i = curve_points.last(); const float3 old_tip_position = positions[last_point_i]; @@ -304,7 +304,7 @@ class DensityAddOperation : public CurvesSculptStrokeOperation { if (old_kdtree_ == nullptr && minimum_distance > 0.0f) { old_kdtree_ = this->kdtree_from_curve_roots_and_positions(curves, curves.curves_range(), {}); - old_kdtree_size_ = curves.curves_size(); + old_kdtree_size_ = curves.num_curves(); } float density; @@ -525,7 +525,7 @@ class DensityAddOperation : public CurvesSculptStrokeOperation { { Array<bool> elimination_mask(points.positions.size(), false); - const int curves_added_previously = curves.curves_size() - old_kdtree_size_; + const int curves_added_previously = curves.num_curves() - old_kdtree_size_; KDTree_3d *new_points_kdtree = this->kdtree_from_curve_roots_and_positions( curves, IndexRange(old_kdtree_size_, curves_added_previously), points.positions); @@ -589,14 +589,14 @@ class DensityAddOperation : public CurvesSculptStrokeOperation { const int tot_new_curves = new_points.positions.size(); const int points_per_curve = 8; - curves.resize(curves.points_size() + tot_new_curves * points_per_curve, - curves.curves_size() + tot_new_curves); + curves.resize(curves.num_points() + tot_new_curves * points_per_curve, + curves.num_curves() + tot_new_curves); MutableSpan<int> offsets = curves.offsets(); MutableSpan<float3> positions = curves.positions(); for (const int i : IndexRange(tot_new_curves)) { - const int curve_i = curves.curves_size() - tot_new_curves + i; + const int curve_i = curves.num_curves() - tot_new_curves + i; const int first_point_i = offsets[curve_i]; offsets[curve_i + 1] = offsets[curve_i] + points_per_curve; |