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/curves | |
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/curves')
-rw-r--r-- | source/blender/editors/curves/intern/curves_add.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/curves/intern/curves_add.cc b/source/blender/editors/curves/intern/curves_add.cc index 9cde23451dc..fadaac27431 100644 --- a/source/blender/editors/curves/intern/curves_add.cc +++ b/source/blender/editors/curves/intern/curves_add.cc @@ -21,7 +21,7 @@ bke::CurvesGeometry primitive_random_sphere(const int curves_size, const int poi float *radius_data = (float *)CustomData_add_layer_named( &curves.point_data, CD_PROP_FLOAT, CD_DEFAULT, nullptr, curves.point_size, "radius"); - MutableSpan<float> radii{radius_data, curves.points_size()}; + MutableSpan<float> radii{radius_data, curves.num_points()}; for (const int i : offsets.index_range()) { offsets[i] = points_per_curve * i; @@ -30,7 +30,7 @@ bke::CurvesGeometry primitive_random_sphere(const int curves_size, const int poi RandomNumberGenerator rng; for (const int i : curves.curves_range()) { - const IndexRange curve_range = curves.range_for_curve(i); + const IndexRange curve_range = curves.points_for_curve(i); MutableSpan<float3> curve_positions = positions.slice(curve_range); MutableSpan<float> curve_radii = radii.slice(curve_range); |