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-25 04:48:08 +0300
committerHans Goudey <h.goudey@me.com>2022-03-25 04:48:08 +0300
commit6e72e3fdb295fdfd3e252bd48be96e2d832e43f2 (patch)
tree70e439dfb872a2bb6dc2be33163f5fa13f82c434 /source/blender/nodes
parentd3999683ff5ac8b42de74cb453b459096f76f542 (diff)
Cleanup: Further renaming in new curves code
A follow-up to e253f9f66d6f. Follow the policy from T85728 completely (using "num" as a prefix) and rename another function.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc8
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc4
5 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
index 87fc6bcbad4..6794671f707 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
@@ -241,7 +241,7 @@ static void read_curve_positions(const Curves &curves_id,
Vector<float3> *r_coords)
{
const bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry);
- const int total_size = curves.evaluated_points_size();
+ const int total_size = curves.evaluated_points_num();
r_coords->reserve(r_coords->size() + total_size * transforms.size());
r_coords->as_mutable_span().take_back(total_size).copy_from(curves.evaluated_positions());
for (const float3 &position : curves.evaluated_positions()) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
index 1ef4705ed75..bbc8758952d 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_endpoint_selection.cc
@@ -55,19 +55,19 @@ class EndpointFieldInput final : public GeometryFieldInput {
const Curves &curves_id = *curve_component.get_for_read();
const bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry);
- if (curves.num_points() == 0) {
+ if (curves.points_num() == 0) {
return nullptr;
}
GeometryComponentFieldContext size_context{curve_component, ATTR_DOMAIN_CURVE};
- fn::FieldEvaluator evaluator{size_context, curves.num_curves()};
+ fn::FieldEvaluator evaluator{size_context, curves.curves_num()};
evaluator.add(start_size_);
evaluator.add(end_size_);
evaluator.evaluate();
const VArray<int> &start_size = evaluator.get_evaluated<int>(0);
const VArray<int> &end_size = evaluator.get_evaluated<int>(1);
- Array<bool> selection(curves.num_points(), false);
+ Array<bool> selection(curves.points_num(), false);
MutableSpan<bool> selection_span = selection.as_mutable_span();
devirtualize_varray2(start_size, end_size, [&](const auto &start_size, const auto &end_size) {
threading::parallel_for(curves.curves_range(), 1024, [&](IndexRange curves_range) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
index 5c7c9f22e15..f29b193d98b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
@@ -45,8 +45,8 @@ static meshintersect::CDT_result<double> do_cdt(const bke::CurvesGeometry &curve
{
meshintersect::CDT_input<double> input;
input.need_ids = false;
- input.vert.reinitialize(curves.evaluated_points_size());
- input.face.reinitialize(curves.num_curves());
+ input.vert.reinitialize(curves.evaluated_points_num());
+ input.face.reinitialize(curves.curves_num());
VArray<bool> cyclic = curves.cyclic();
Span<float3> positions = curves.evaluated_positions();
@@ -118,7 +118,7 @@ static void curve_fill_calculate(GeometrySet &geometry_set, const GeometryNodeCu
const Curves &curves_id = *geometry_set.get_curves_for_read();
const bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry);
- if (curves.num_curves() == 0) {
+ if (curves.curves_num() == 0) {
geometry_set.replace_curves(nullptr);
return;
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
index b85ef07e9fe..f46c5d3bee1 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
@@ -345,7 +345,7 @@ static void duplicate_curves(GeometrySet &geometry_set,
const bke::CurvesGeometry &curves = bke::CurvesGeometry::wrap(curves_id.geometry);
GeometryComponentFieldContext field_context{src_component, ATTR_DOMAIN_CURVE};
- FieldEvaluator evaluator{field_context, curves.num_curves()};
+ FieldEvaluator evaluator{field_context, curves.curves_num()};
evaluator.add(count_field);
evaluator.set_selection(selection_field);
evaluator.evaluate();
@@ -800,12 +800,12 @@ static void duplicate_points_curve(GeometrySet &geometry_set,
const CurveComponent &src_component = *geometry_set.get_component_for_read<CurveComponent>();
const Curves &src_curves_id = *src_component.get_for_read();
const bke::CurvesGeometry &src_curves = bke::CurvesGeometry::wrap(src_curves_id.geometry);
- if (src_curves.num_points() == 0) {
+ if (src_curves.points_num() == 0) {
return;
}
GeometryComponentFieldContext field_context{src_component, ATTR_DOMAIN_POINT};
- FieldEvaluator evaluator{field_context, src_curves.num_points()};
+ FieldEvaluator evaluator{field_context, src_curves.points_num()};
evaluator.add(count_field);
evaluator.set_selection(selection_field);
evaluator.evaluate();
@@ -815,7 +815,7 @@ static void duplicate_points_curve(GeometrySet &geometry_set,
Array<int> offsets = accumulate_counts_to_offsets(selection, counts);
const int dst_size = offsets.last();
- Array<int> point_to_curve_map(src_curves.num_points());
+ Array<int> point_to_curve_map(src_curves.points_num());
threading::parallel_for(src_curves.curves_range(), 1024, [&](const IndexRange range) {
for (const int i_curve : range) {
const IndexRange point_range = src_curves.points_for_curve(i_curve);
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
index 3cf5aebda12..ab6f6b40d5e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc
@@ -89,10 +89,10 @@ static VArray<int> construct_spline_count_gvarray(const CurveComponent &componen
auto count_fn = [curves](int64_t i) { return curves.points_for_curve(i).size(); };
if (domain == ATTR_DOMAIN_CURVE) {
- return VArray<int>::ForFunc(curves.num_curves(), count_fn);
+ return VArray<int>::ForFunc(curves.curves_num(), count_fn);
}
if (domain == ATTR_DOMAIN_POINT) {
- VArray<int> count = VArray<int>::ForFunc(curves.num_curves(), count_fn);
+ VArray<int> count = VArray<int>::ForFunc(curves.curves_num(), count_fn);
return component.attribute_try_adapt_domain<int>(
std::move(count), ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT);
}