Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-03-24 07:01:02 +0300
committerHans Goudey <h.goudey@me.com>2022-03-24 07:05:46 +0300
commite253f9f66d6f63592ffd97afe207ef7c72547d03 (patch)
tree9a9345ab1184f0f6fda51740967595cc2f52a4bf /source/blender/blenkernel/intern
parenta1598d6835d0c579579881bca900f9259b26d11a (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/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/curve_catmull_rom.cc6
-rw-r--r--source/blender/blenkernel/intern/curve_eval.cc4
-rw-r--r--source/blender/blenkernel/intern/curve_nurbs.cc40
-rw-r--r--source/blender/blenkernel/intern/curves.cc10
-rw-r--r--source/blender/blenkernel/intern/curves_geometry.cc84
-rw-r--r--source/blender/blenkernel/intern/curves_geometry_test.cc2
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curves.cc4
7 files changed, 75 insertions, 75 deletions
diff --git a/source/blender/blenkernel/intern/curve_catmull_rom.cc b/source/blender/blenkernel/intern/curve_catmull_rom.cc
index 27687eb736f..5b6d0cac21f 100644
--- a/source/blender/blenkernel/intern/curve_catmull_rom.cc
+++ b/source/blender/blenkernel/intern/curve_catmull_rom.cc
@@ -9,11 +9,11 @@
namespace blender::bke::curves::catmull_rom {
-int calculate_evaluated_size(const int size, const bool cyclic, const int resolution)
+int calculate_evaluated_size(const int num_points, const bool cyclic, const int resolution)
{
- const int eval_size = resolution * curve_segment_size(size, cyclic);
+ const int eval_size = resolution * curve_segment_size(num_points, cyclic);
/* If the curve isn't cyclic, one last point is added to the final point. */
- return (cyclic && size > 2) ? eval_size : eval_size + 1;
+ return (cyclic && num_points > 2) ? eval_size : eval_size + 1;
}
/* Adapted from Cycles #catmull_rom_basis_eval function. */
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index b2399f25638..2cf83b57881 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -398,7 +398,7 @@ std::unique_ptr<CurveEval> curves_to_curve_eval(const Curves &curves)
VArray<int8_t> curve_types = geometry.curve_types();
std::unique_ptr<CurveEval> curve_eval = std::make_unique<CurveEval>();
for (const int curve_index : curve_types.index_range()) {
- const IndexRange point_range = geometry.range_for_curve(curve_index);
+ const IndexRange point_range = geometry.points_for_curve(curve_index);
std::unique_ptr<Spline> spline;
switch (curve_types[curve_index]) {
@@ -489,7 +489,7 @@ Curves *curve_eval_to_curves(const CurveEval &curve_eval)
const Spline &spline = *curve_eval.splines()[curve_index];
curve_types[curve_index] = curve_eval.splines()[curve_index]->type();
- const IndexRange point_range = geometry.range_for_curve(curve_index);
+ const IndexRange point_range = geometry.points_for_curve(curve_index);
switch (spline.type()) {
case CURVE_TYPE_POLY:
diff --git a/source/blender/blenkernel/intern/curve_nurbs.cc b/source/blender/blenkernel/intern/curve_nurbs.cc
index a4cdbbca654..bd6bd222aa3 100644
--- a/source/blender/blenkernel/intern/curve_nurbs.cc
+++ b/source/blender/blenkernel/intern/curve_nurbs.cc
@@ -10,53 +10,53 @@
namespace blender::bke::curves::nurbs {
-bool check_valid_size_and_order(const int size,
+bool check_valid_size_and_order(const int num_points,
const int8_t order,
const bool cyclic,
const KnotsMode knots_mode)
{
- if (size < order) {
+ if (num_points < order) {
return false;
}
if (ELEM(knots_mode, NURBS_KNOT_MODE_BEZIER, NURBS_KNOT_MODE_ENDPOINT_BEZIER)) {
- if (knots_mode == NURBS_KNOT_MODE_BEZIER && size <= order) {
+ if (knots_mode == NURBS_KNOT_MODE_BEZIER && num_points <= order) {
return false;
}
- return (!cyclic || size % (order - 1) == 0);
+ return (!cyclic || num_points % (order - 1) == 0);
}
return true;
}
-int calculate_evaluated_size(const int size,
+int calculate_evaluated_size(const int num_points,
const int8_t order,
const bool cyclic,
const int resolution,
const KnotsMode knots_mode)
{
- if (!check_valid_size_and_order(size, order, cyclic, knots_mode)) {
+ if (!check_valid_size_and_order(num_points, order, cyclic, knots_mode)) {
return 0;
}
- return resolution * curve_segment_size(size, cyclic);
+ return resolution * curve_segment_size(num_points, cyclic);
}
-int knots_size(const int size, const int8_t order, const bool cyclic)
+int knots_size(const int num_points, const int8_t order, const bool cyclic)
{
if (cyclic) {
- return size + order * 2 - 1;
+ return num_points + order * 2 - 1;
}
- return size + order;
+ return num_points + order;
}
-void calculate_knots(const int size,
+void calculate_knots(const int num_points,
const KnotsMode mode,
const int8_t order,
const bool cyclic,
MutableSpan<float> knots)
{
- BLI_assert(knots.size() == knots_size(size, order, cyclic));
- UNUSED_VARS_NDEBUG(size);
+ BLI_assert(knots.size() == knots_size(num_points, order, cyclic));
+ UNUSED_VARS_NDEBUG(num_points);
const bool is_bezier = ELEM(mode, NURBS_KNOT_MODE_BEZIER, NURBS_KNOT_MODE_ENDPOINT_BEZIER);
const bool is_end_point = ELEM(mode, NURBS_KNOT_MODE_ENDPOINT, NURBS_KNOT_MODE_ENDPOINT_BEZIER);
@@ -94,7 +94,7 @@ void calculate_knots(const int size,
}
static void calculate_basis_for_point(const float parameter,
- const int size,
+ const int num_points,
const int degree,
const Span<float> knots,
MutableSpan<float> r_weights,
@@ -104,7 +104,7 @@ static void calculate_basis_for_point(const float parameter,
int start = 0;
int end = 0;
- for (const int i : IndexRange(size + degree)) {
+ for (const int i : IndexRange(num_points + degree)) {
const bool knots_equal = knots[i] == knots[i + 1];
if (knots_equal || parameter < knots[i] || parameter > knots[i + 1]) {
continue;
@@ -121,7 +121,7 @@ static void calculate_basis_for_point(const float parameter,
for (const int i_order : IndexRange(2, degree)) {
if (end + i_order >= knots.size()) {
- end = size + degree - i_order;
+ end = num_points + degree - i_order;
}
for (const int i : IndexRange(end - start + 1)) {
const int knot_index = start + i;
@@ -146,14 +146,14 @@ static void calculate_basis_for_point(const float parameter,
r_start_index = start;
}
-void calculate_basis_cache(const int size,
+void calculate_basis_cache(const int num_points,
const int evaluated_size,
const int8_t order,
const bool cyclic,
const Span<float> knots,
BasisCache &basis_cache)
{
- BLI_assert(size > 0);
+ BLI_assert(num_points > 0);
BLI_assert(evaluated_size > 0);
const int8_t degree = order - 1;
@@ -168,7 +168,7 @@ void calculate_basis_cache(const int size,
MutableSpan<float> basis_weights(basis_cache.weights);
MutableSpan<int> basis_start_indices(basis_cache.start_indices);
- const int last_control_point_index = cyclic ? size + degree : size;
+ const int last_control_point_index = cyclic ? num_points + degree : num_points;
const int evaluated_segment_size = curve_segment_size(evaluated_size, cyclic);
const float start = knots[degree];
@@ -176,7 +176,7 @@ void calculate_basis_cache(const int size,
const float step = (end - start) / evaluated_segment_size;
for (const int i : IndexRange(evaluated_size)) {
/* Clamp parameter due to floating point inaccuracy. */
- const float parameter = std::clamp(start + step * i, knots[0], knots[size + degree]);
+ const float parameter = std::clamp(start + step * i, knots[0], knots[num_points + degree]);
MutableSpan<float> point_weights = basis_weights.slice(i * order, order);
diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc
index 838f7f28e93..e88d25ae56a 100644
--- a/source/blender/blenkernel/intern/curves.cc
+++ b/source/blender/blenkernel/intern/curves.cc
@@ -366,19 +366,19 @@ void BKE_curves_batch_cache_free(Curves *curves)
namespace blender::bke {
-Curves *curves_new_nomain(const int point_size, const int curves_size)
+Curves *curves_new_nomain(const int num_points, const int num_curves)
{
Curves *curves = static_cast<Curves *>(BKE_id_new_nomain(ID_CV, nullptr));
CurvesGeometry &geometry = CurvesGeometry::wrap(curves->geometry);
- geometry.resize(point_size, curves_size);
+ geometry.resize(num_points, num_curves);
return curves;
}
-Curves *curves_new_nomain_single(const int point_size, const CurveType type)
+Curves *curves_new_nomain_single(const int num_points, const CurveType type)
{
- Curves *curves = curves_new_nomain(point_size, 1);
+ Curves *curves = curves_new_nomain(num_points, 1);
CurvesGeometry &geometry = CurvesGeometry::wrap(curves->geometry);
- geometry.offsets().last() = point_size;
+ geometry.offsets().last() = num_points;
geometry.curve_types().first() = type;
return curves;
}
diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index db69fbc4063..f9c925b626d 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -149,24 +149,24 @@ CurvesGeometry::~CurvesGeometry()
/** \name Accessors
* \{ */
-int CurvesGeometry::points_size() const
+int CurvesGeometry::num_points() const
{
return this->point_size;
}
-int CurvesGeometry::curves_size() const
+int CurvesGeometry::num_curves() const
{
return this->curve_size;
}
IndexRange CurvesGeometry::points_range() const
{
- return IndexRange(this->points_size());
+ return IndexRange(this->num_points());
}
IndexRange CurvesGeometry::curves_range() const
{
- return IndexRange(this->curves_size());
+ return IndexRange(this->num_curves());
}
-IndexRange CurvesGeometry::range_for_curve(const int index) const
+IndexRange CurvesGeometry::points_for_curve(const int index) const
{
BLI_assert(this->curve_size > 0);
BLI_assert(this->curve_offsets != nullptr);
@@ -175,7 +175,7 @@ IndexRange CurvesGeometry::range_for_curve(const int index) const
return {offset, offset_next - offset};
}
-IndexRange CurvesGeometry::range_for_curves(const IndexRange curves) const
+IndexRange CurvesGeometry::points_for_curves(const IndexRange curves) const
{
BLI_assert(this->curve_size > 0);
BLI_assert(this->curve_offsets != nullptr);
@@ -186,7 +186,7 @@ IndexRange CurvesGeometry::range_for_curves(const IndexRange curves) const
static int domain_size(const CurvesGeometry &curves, const AttributeDomain domain)
{
- return domain == ATTR_DOMAIN_POINT ? curves.points_size() : curves.curves_size();
+ return domain == ATTR_DOMAIN_POINT ? curves.num_points() : curves.num_curves();
}
static CustomData &domain_custom_data(CurvesGeometry &curves, const AttributeDomain domain)
@@ -431,7 +431,7 @@ static void calculate_evaluated_offsets(const CurvesGeometry &curves,
VArray<int8_t> nurbs_knots_modes = curves.nurbs_knots_modes();
build_offsets(offsets, [&](const int curve_index) -> int {
- const IndexRange points = curves.range_for_curve(curve_index);
+ const IndexRange points = curves.points_for_curve(curve_index);
switch (types[curve_index]) {
case CURVE_TYPE_CATMULL_ROM:
return curves::catmull_rom::calculate_evaluated_size(
@@ -463,7 +463,7 @@ int CurvesGeometry::evaluated_points_size() const
return this->evaluated_offsets().last();
}
-IndexRange CurvesGeometry::evaluated_range_for_curve(int index) const
+IndexRange CurvesGeometry::evaluated_points_for_curve(int index) const
{
BLI_assert(!this->runtime->offsets_cache_dirty);
return offsets_to_range(this->runtime->evaluated_offsets_cache.as_span(), index);
@@ -482,10 +482,10 @@ Span<int> CurvesGeometry::evaluated_offsets() const
}
threading::isolate_task([&]() {
- this->runtime->evaluated_offsets_cache.resize(this->curves_size() + 1);
+ this->runtime->evaluated_offsets_cache.resize(this->num_curves() + 1);
if (this->has_curve_with_type(CURVE_TYPE_BEZIER)) {
- this->runtime->bezier_evaluated_offsets.resize(this->points_size());
+ this->runtime->bezier_evaluated_offsets.resize(this->num_points());
}
else {
this->runtime->bezier_evaluated_offsets.clear_and_make_inline();
@@ -536,7 +536,7 @@ void CurvesGeometry::ensure_nurbs_basis_cache() const
return;
}
- this->runtime->nurbs_basis_cache.resize(this->curves_size());
+ this->runtime->nurbs_basis_cache.resize(this->num_curves());
MutableSpan<curves::nurbs::BasisCache> basis_caches(this->runtime->nurbs_basis_cache);
VArray<bool> cyclic = this->cyclic();
@@ -545,8 +545,8 @@ void CurvesGeometry::ensure_nurbs_basis_cache() const
threading::parallel_for(nurbs_mask.index_range(), 64, [&](const IndexRange range) {
for (const int curve_index : nurbs_mask.slice(range)) {
- const IndexRange points = this->range_for_curve(curve_index);
- const IndexRange evaluated_points = this->evaluated_range_for_curve(curve_index);
+ const IndexRange points = this->points_for_curve(curve_index);
+ const IndexRange evaluated_points = this->evaluated_points_for_curve(curve_index);
const int8_t order = orders[curve_index];
const bool is_cyclic = cyclic[curve_index];
@@ -598,8 +598,8 @@ Span<float3> CurvesGeometry::evaluated_positions() const
threading::parallel_for(this->curves_range(), 128, [&](IndexRange curves_range) {
for (const int curve_index : curves_range) {
- const IndexRange points = this->range_for_curve(curve_index);
- const IndexRange evaluated_points = this->evaluated_range_for_curve(curve_index);
+ const IndexRange points = this->points_for_curve(curve_index);
+ const IndexRange evaluated_points = this->evaluated_points_for_curve(curve_index);
switch (types[curve_index]) {
case CURVE_TYPE_CATMULL_ROM:
@@ -645,16 +645,16 @@ Span<float3> CurvesGeometry::evaluated_positions() const
/** \name Operations
* \{ */
-void CurvesGeometry::resize(const int point_size, const int curve_size)
+void CurvesGeometry::resize(const int num_points, const int num_curves)
{
- if (point_size != this->point_size) {
- CustomData_realloc(&this->point_data, point_size);
- this->point_size = point_size;
+ if (num_points != this->point_size) {
+ CustomData_realloc(&this->point_data, num_points);
+ this->point_size = num_points;
}
- if (curve_size != this->curve_size) {
- CustomData_realloc(&this->curve_data, curve_size);
- this->curve_size = curve_size;
- this->curve_offsets = (int *)MEM_reallocN(this->curve_offsets, sizeof(int) * (curve_size + 1));
+ if (num_curves != this->curve_size) {
+ CustomData_realloc(&this->curve_data, num_curves);
+ this->curve_size = num_curves;
+ this->curve_offsets = (int *)MEM_reallocN(this->curve_offsets, sizeof(int) * (num_curves + 1));
}
this->tag_topology_changed();
this->update_customdata_pointers();
@@ -727,7 +727,7 @@ static std::optional<bounds::MinMaxResult<float3>> curves_bounds(const CurvesGeo
{
Span<float3> positions = curves.positions();
if (curves.radius) {
- Span<float> radii{curves.radius, curves.points_size()};
+ Span<float> radii{curves.radius, curves.num_points()};
return bounds::min_max_with_radii(positions, radii);
}
return bounds::min_max(positions);
@@ -784,7 +784,7 @@ static CurvesGeometry copy_with_removed_curves(const CurvesGeometry &curves,
new_curve_ranges.append(IndexRange(new_tot_curves, curve_range.size()));
new_tot_curves += curve_range.size();
- const IndexRange old_point_range = curves.range_for_curves(curve_range);
+ const IndexRange old_point_range = curves.points_for_curves(curve_range);
old_point_ranges.append(old_point_range);
new_point_ranges.append(IndexRange(new_tot_points, old_point_range.size()));
new_tot_points += old_point_range.size();
@@ -889,7 +889,7 @@ static void reverse_curve_point_data(const CurvesGeometry &curves,
{
threading::parallel_for(curve_selection.index_range(), 256, [&](IndexRange range) {
for (const int curve_i : curve_selection.slice(range)) {
- data.slice(curves.range_for_curve(curve_i)).reverse();
+ data.slice(curves.points_for_curve(curve_i)).reverse();
}
});
}
@@ -902,7 +902,7 @@ static void reverse_swap_curve_point_data(const CurvesGeometry &curves,
{
threading::parallel_for(curve_selection.index_range(), 256, [&](IndexRange range) {
for (const int curve_i : curve_selection.slice(range)) {
- const IndexRange points = curves.range_for_curve(curve_i);
+ const IndexRange points = curves.points_for_curve(curve_i);
MutableSpan<T> a = data_a.slice(points);
MutableSpan<T> b = data_b.slice(points);
for (const int i : IndexRange(points.size() / 2)) {
@@ -926,7 +926,7 @@ static bool layer_matches_name_and_type(const CustomDataLayer &layer,
void CurvesGeometry::reverse_curves(const IndexMask curves_to_reverse)
{
- CustomData_duplicate_referenced_layers(&this->point_data, this->points_size());
+ CustomData_duplicate_referenced_layers(&this->point_data, this->num_points());
/* Collect the Bezier handle attributes while iterating through the point custom data layers;
* they need special treatment later. */
@@ -940,22 +940,22 @@ void CurvesGeometry::reverse_curves(const IndexMask curves_to_reverse)
if (positions_left.is_empty() &&
layer_matches_name_and_type(layer, ATTR_HANDLE_POSITION_LEFT, CD_PROP_FLOAT3)) {
- positions_left = {static_cast<float3 *>(layer.data), this->points_size()};
+ positions_left = {static_cast<float3 *>(layer.data), this->num_points()};
continue;
}
if (positions_right.is_empty() &&
layer_matches_name_and_type(layer, ATTR_HANDLE_POSITION_RIGHT, CD_PROP_FLOAT3)) {
- positions_right = {static_cast<float3 *>(layer.data), this->points_size()};
+ positions_right = {static_cast<float3 *>(layer.data), this->num_points()};
continue;
}
if (types_left.is_empty() &&
layer_matches_name_and_type(layer, ATTR_HANDLE_TYPE_LEFT, CD_PROP_INT8)) {
- types_left = {static_cast<int8_t *>(layer.data), this->points_size()};
+ types_left = {static_cast<int8_t *>(layer.data), this->num_points()};
continue;
}
if (types_right.is_empty() &&
layer_matches_name_and_type(layer, ATTR_HANDLE_TYPE_RIGHT, CD_PROP_INT8)) {
- types_right = {static_cast<int8_t *>(layer.data), this->points_size()};
+ types_right = {static_cast<int8_t *>(layer.data), this->num_points()};
continue;
}
@@ -963,7 +963,7 @@ void CurvesGeometry::reverse_curves(const IndexMask curves_to_reverse)
attribute_math::convert_to_static_type(data_type, [&](auto dummy) {
using T = decltype(dummy);
reverse_curve_point_data<T>(
- *this, curves_to_reverse, {static_cast<T *>(layer.data), this->points_size()});
+ *this, curves_to_reverse, {static_cast<T *>(layer.data), this->num_points()});
});
}
@@ -1001,8 +1001,8 @@ static void adapt_curve_domain_point_to_curve_impl(const CurvesGeometry &curves,
MutableSpan<T> r_values)
{
attribute_math::DefaultMixer<T> mixer(r_values);
- for (const int i_curve : IndexRange(curves.curves_size())) {
- for (const int i_point : curves.range_for_curve(i_curve)) {
+ for (const int i_curve : IndexRange(curves.num_curves())) {
+ for (const int i_point : curves.points_for_curve(i_curve)) {
mixer.mix_in(i_curve, old_values[i_point]);
}
}
@@ -1022,8 +1022,8 @@ void adapt_curve_domain_point_to_curve_impl(const CurvesGeometry &curves,
MutableSpan<bool> r_values)
{
r_values.fill(true);
- for (const int i_curve : IndexRange(curves.curves_size())) {
- for (const int i_point : curves.range_for_curve(i_curve)) {
+ for (const int i_curve : IndexRange(curves.num_curves())) {
+ for (const int i_point : curves.points_for_curve(i_curve)) {
if (!old_values[i_point]) {
r_values[i_curve] = false;
break;
@@ -1039,7 +1039,7 @@ static GVArray adapt_curve_domain_point_to_curve(const CurvesGeometry &curves,
attribute_math::convert_to_static_type(varray.type(), [&](auto dummy) {
using T = decltype(dummy);
if constexpr (!std::is_void_v<attribute_math::DefaultMixer<T>>) {
- Array<T> values(curves.curves_size());
+ Array<T> values(curves.num_curves());
adapt_curve_domain_point_to_curve_impl<T>(curves, varray.typed<T>(), values);
new_varray = VArray<T>::ForContainer(std::move(values));
}
@@ -1059,8 +1059,8 @@ static void adapt_curve_domain_curve_to_point_impl(const CurvesGeometry &curves,
const VArray<T> &old_values,
MutableSpan<T> r_values)
{
- for (const int i_curve : IndexRange(curves.curves_size())) {
- r_values.slice(curves.range_for_curve(i_curve)).fill(old_values[i_curve]);
+ for (const int i_curve : IndexRange(curves.num_curves())) {
+ r_values.slice(curves.points_for_curve(i_curve)).fill(old_values[i_curve]);
}
}
@@ -1070,7 +1070,7 @@ static GVArray adapt_curve_domain_curve_to_point(const CurvesGeometry &curves,
GVArray new_varray;
attribute_math::convert_to_static_type(varray.type(), [&](auto dummy) {
using T = decltype(dummy);
- Array<T> values(curves.points_size());
+ Array<T> values(curves.num_points());
adapt_curve_domain_curve_to_point_impl<T>(curves, varray.typed<T>(), values);
new_varray = VArray<T>::ForContainer(std::move(values));
});
diff --git a/source/blender/blenkernel/intern/curves_geometry_test.cc b/source/blender/blenkernel/intern/curves_geometry_test.cc
index 1b3b3f54451..fd994d5abf4 100644
--- a/source/blender/blenkernel/intern/curves_geometry_test.cc
+++ b/source/blender/blenkernel/intern/curves_geometry_test.cc
@@ -46,7 +46,7 @@ TEST(curves_geometry, Move)
CurvesGeometry other = std::move(curves);
/* The old curves should be empty, and the offsets are expected to be null. */
- EXPECT_EQ(curves.points_size(), 0); /* NOLINT: bugprone-use-after-move */
+ EXPECT_EQ(curves.num_points(), 0); /* NOLINT: bugprone-use-after-move */
EXPECT_EQ(curves.curve_offsets, nullptr); /* NOLINT: bugprone-use-after-move */
/* Just a basic check that the new curves work okay. */
diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc
index 7cf6fc5a03e..83b8e5fb262 100644
--- a/source/blender/blenkernel/intern/geometry_component_curves.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curves.cc
@@ -236,10 +236,10 @@ int CurveComponent::attribute_domain_size(const AttributeDomain domain) const
const blender::bke::CurvesGeometry &geometry = blender::bke::CurvesGeometry::wrap(
curves_->geometry);
if (domain == ATTR_DOMAIN_POINT) {
- return geometry.points_size();
+ return geometry.num_points();
}
if (domain == ATTR_DOMAIN_CURVE) {
- return geometry.curves_size();
+ return geometry.num_curves();
}
return 0;
}