diff options
author | Hans Goudey <h.goudey@me.com> | 2022-02-28 18:53:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-02-28 18:53:30 +0300 |
commit | 245722866d6977c8b440e0f468ebf6528d3970e1 (patch) | |
tree | cc9bac5c3eca3aa984269de581285150ca8d5e68 /source | |
parent | 9ec12c26f16ea3da1e6de95d5d5daf1057464830 (diff) |
Cleanup: Rename geometry set "curve" functions to "curves"
Ref T95355
Diffstat (limited to 'source')
44 files changed, 81 insertions, 81 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index f11bfb7692a..f7767cc2a60 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -413,9 +413,9 @@ struct GeometrySet { static GeometrySet create_with_pointcloud( PointCloud *pointcloud, GeometryOwnershipType ownership = GeometryOwnershipType::Owned); /** - * Create a new geometry set that only contains the given curve. + * Create a new geometry set that only contains the given curves. */ - static GeometrySet create_with_curve( + static GeometrySet create_with_curves( Curves *curves, GeometryOwnershipType ownership = GeometryOwnershipType::Owned); /* Utility methods for access. */ @@ -436,9 +436,9 @@ struct GeometrySet { */ bool has_volume() const; /** - * Returns true when the geometry set has a curve component that has a curve. + * Returns true when the geometry set has a curves component that has a curves data-block. */ - bool has_curve() const; + bool has_curves() const; /** * Returns true when the geometry set has any data that is not an instance. */ @@ -461,9 +461,9 @@ struct GeometrySet { */ const Volume *get_volume_for_read() const; /** - * Returns a read-only curve or null. + * Returns a read-only curves data-block or null. */ - const Curves *get_curve_for_read() const; + const Curves *get_curves_for_read() const; /** * Returns a mutable mesh or null. No ownership is transferred. @@ -478,9 +478,9 @@ struct GeometrySet { */ Volume *get_volume_for_write(); /** - * Returns a mutable curve or null. No ownership is transferred. + * Returns a mutable curves data-block or null. No ownership is transferred. */ - Curves *get_curve_for_write(); + Curves *get_curves_for_write(); /* Utility methods for replacement. */ /** @@ -498,7 +498,7 @@ struct GeometrySet { void replace_volume(Volume *volume, GeometryOwnershipType ownership = GeometryOwnershipType::Owned); /** - * Clear the existing curve and replace it with the given one. + * Clear the existing curves data-block and replace it with the given one. */ void replace_curve(Curves *curves, GeometryOwnershipType ownership = GeometryOwnershipType::Owned); diff --git a/source/blender/blenkernel/intern/displist.cc b/source/blender/blenkernel/intern/displist.cc index 97445851ffa..f0894ee04e2 100644 --- a/source/blender/blenkernel/intern/displist.cc +++ b/source/blender/blenkernel/intern/displist.cc @@ -1490,7 +1490,7 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph, else { GeometrySet geometry = evaluate_curve_type_object(depsgraph, scene, ob, for_render, dispbase); - if (geometry.has_curve()) { + if (geometry.has_curves()) { /* Assign the evaluated curve to the object's "data_eval". In addition to the curve_eval * added to the curve here, it will also contain a copy of the original curve's data. This is * essential, because it maintains the expected behavior for evaluated curve data from before diff --git a/source/blender/blenkernel/intern/geometry_set.cc b/source/blender/blenkernel/intern/geometry_set.cc index 73572e30d61..ca372ba8f38 100644 --- a/source/blender/blenkernel/intern/geometry_set.cc +++ b/source/blender/blenkernel/intern/geometry_set.cc @@ -187,7 +187,7 @@ bool GeometrySet::compute_boundbox_without_instances(float3 *r_min, float3 *r_ma if (volume != nullptr) { have_minmax |= BKE_volume_min_max(volume, *r_min, *r_max); } - const Curves *curves = this->get_curve_for_read(); + const Curves *curves = this->get_curves_for_read(); if (curves != nullptr) { std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves); /* Using the evaluated positions is somewhat arbitrary, but it is probably expected. */ @@ -260,7 +260,7 @@ const Volume *GeometrySet::get_volume_for_read() const return (component == nullptr) ? nullptr : component->get_for_read(); } -const Curves *GeometrySet::get_curve_for_read() const +const Curves *GeometrySet::get_curves_for_read() const { const CurveComponent *component = this->get_component_for_read<CurveComponent>(); return (component == nullptr) ? nullptr : component->get_for_read(); @@ -284,7 +284,7 @@ bool GeometrySet::has_volume() const return component != nullptr && component->has_volume(); } -bool GeometrySet::has_curve() const +bool GeometrySet::has_curves() const { const CurveComponent *component = this->get_component_for_read<CurveComponent>(); return component != nullptr && component->has_curves(); @@ -304,8 +304,8 @@ bool GeometrySet::has_realized_data() const bool GeometrySet::is_empty() const { - return !(this->has_mesh() || this->has_curve() || this->has_pointcloud() || this->has_volume() || - this->has_instances()); + return !(this->has_mesh() || this->has_curves() || this->has_pointcloud() || + this->has_volume() || this->has_instances()); } GeometrySet GeometrySet::create_with_mesh(Mesh *mesh, GeometryOwnershipType ownership) @@ -329,7 +329,7 @@ GeometrySet GeometrySet::create_with_pointcloud(PointCloud *pointcloud, return geometry_set; } -GeometrySet GeometrySet::create_with_curve(Curves *curves, GeometryOwnershipType ownership) +GeometrySet GeometrySet::create_with_curves(Curves *curves, GeometryOwnershipType ownership) { GeometrySet geometry_set; if (curves != nullptr) { @@ -359,7 +359,7 @@ void GeometrySet::replace_curve(Curves *curves, GeometryOwnershipType ownership) this->remove<CurveComponent>(); return; } - if (curves == this->get_curve_for_read()) { + if (curves == this->get_curves_for_read()) { return; } this->remove<CurveComponent>(); @@ -413,7 +413,7 @@ Volume *GeometrySet::get_volume_for_write() return component == nullptr ? nullptr : component->get_for_write(); } -Curves *GeometrySet::get_curve_for_write() +Curves *GeometrySet::get_curves_for_write() { CurveComponent *component = this->get_component_ptr<CurveComponent>(); return component == nullptr ? nullptr : component->get_for_write(); diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc index 6b5c04ac25e..1542f7119d1 100644 --- a/source/blender/blenkernel/intern/mesh_convert.cc +++ b/source/blender/blenkernel/intern/mesh_convert.cc @@ -957,7 +957,7 @@ static const Curves *get_evaluated_curves_from_object(const Object *object) { GeometrySet *geometry_set_eval = object->runtime.geometry_set_eval; if (geometry_set_eval) { - return geometry_set_eval->get_curve_for_read(); + return geometry_set_eval->get_curves_for_read(); } return nullptr; } diff --git a/source/blender/geometry/intern/realize_instances.cc b/source/blender/geometry/intern/realize_instances.cc index 149ae70dda1..4f7024eea82 100644 --- a/source/blender/geometry/intern/realize_instances.cc +++ b/source/blender/geometry/intern/realize_instances.cc @@ -1041,7 +1041,7 @@ static OrderedAttributes gather_generic_curve_attributes_to_propagate( static void gather_curves_to_realize(const GeometrySet &geometry_set, VectorSet<const Curves *> &r_curves) { - if (const Curves *curves = geometry_set.get_curve_for_read()) { + if (const Curves *curves = geometry_set.get_curves_for_read()) { if (curves->geometry.curve_size != 0) { r_curves.add(curves); } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_endpoints.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_endpoints.cc index e6f3e483f1f..0980c2d6e72 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_endpoints.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_endpoints.cc @@ -137,7 +137,7 @@ static void node_geo_exec(GeoNodeExecParams params) geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_default_remaining_outputs(); return; } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc index 78e36784be7..2fe06a17adf 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc @@ -19,7 +19,7 @@ static void node_geo_exec(GeoNodeExecParams params) { GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve"); geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_output("Curve", geometry_set); return; } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc index 8ab43909a20..537c7c42610 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc @@ -56,7 +56,7 @@ static void node_geo_exec(GeoNodeExecParams params) GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve"); geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_output("Curve", geometry_set); return; } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc index e15e7339107..4e3b0839da7 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc @@ -236,7 +236,7 @@ static void node_geo_exec(GeoNodeExecParams params) GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve"); geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_output("Curve", geometry_set); return; } @@ -269,7 +269,7 @@ static void node_geo_exec(GeoNodeExecParams params) } new_curve->attributes = curve->attributes; - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*new_curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*new_curve))); } } // namespace blender::nodes::node_geo_legacy_curve_spline_type_cc diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_subdivide.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_subdivide.cc index 2a8ab2990db..03f7aec8838 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_subdivide.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_subdivide.cc @@ -342,7 +342,7 @@ static void node_geo_exec(GeoNodeExecParams params) geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_output("Geometry", geometry_set); return; } @@ -358,7 +358,7 @@ static void node_geo_exec(GeoNodeExecParams params) *curves_to_curve_eval(*component.get_for_read()), cuts); params.set_output("Geometry", - GeometrySet::create_with_curve(curve_eval_to_curves(*output_curve))); + GeometrySet::create_with_curves(curve_eval_to_curves(*output_curve))); } } // namespace blender::nodes::node_geo_legacy_curve_subdivide_cc diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_to_points.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_to_points.cc index f68dd6b6b0c..f8fcc3cc363 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_to_points.cc @@ -283,7 +283,7 @@ static void node_geo_exec(GeoNodeExecParams params) geometry_set = geometry::realize_instances_legacy(geometry_set); - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { params.set_output("Geometry", GeometrySet()); return; } diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc index cb5a757811e..8991261a21a 100644 --- a/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc +++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc @@ -48,7 +48,7 @@ static void node_geo_exec(GeoNodeExecParams params) std::unique_ptr<CurveEval> curve = geometry::mesh_to_curve_convert( component, IndexMask(selected_edge_indices)); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_legacy_mesh_to_curve_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc index b6d677154d0..b3fe9d160b3 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc @@ -84,7 +84,7 @@ static void node_geo_exec(GeoNodeExecParams params) break; } case GEO_COMPONENT_TYPE_CURVE: { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { const CurveComponent *component = geometry_set.get_component_for_read<CurveComponent>(); params.set_output("Point Count", component->attribute_domain_size(ATTR_DOMAIN_POINT)); params.set_output("Spline Count", component->attribute_domain_size(ATTR_DOMAIN_CURVE)); 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 44b9857e791..412f35d62fd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc @@ -161,9 +161,9 @@ static Mesh *compute_hull(const GeometrySet &geometry_set) positions_span = varray.get_internal_span(); } - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); for (const SplinePtr &spline : curve->splines()) { positions_span = spline->evaluated_positions(); total_size += positions_span.size(); @@ -202,9 +202,9 @@ static Mesh *compute_hull(const GeometrySet &geometry_set) offset += varray.size(); } - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); for (const SplinePtr &spline : curve->splines()) { Span<float3> array = spline->evaluated_positions(); positions.as_mutable_span().slice(offset, array.size()).copy_from(array); @@ -274,8 +274,8 @@ static Mesh *convex_hull_from_instances(const GeometrySet &geometry_set) if (set.has_mesh()) { read_positions(*set.get_component_for_read<MeshComponent>(), transforms, &coords); } - if (set.has_curve()) { - read_curve_positions(*curves_to_curve_eval(*set.get_curve_for_read()), transforms, &coords); + if (set.has_curves()) { + read_curve_positions(*curves_to_curve_eval(*set.get_curves_for_read()), transforms, &coords); } } return hull_from_bullet(nullptr, coords); 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 c1220746c22..6702ee6c0aa 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc @@ -113,12 +113,12 @@ static Mesh *cdt_to_mesh(const blender::meshintersect::CDT_result<double> &resul static void curve_fill_calculate(GeometrySet &geometry_set, const GeometryNodeCurveFillMode mode) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); if (curve->splines().is_empty()) { geometry_set.replace_curve(nullptr); return; diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc index 6742b1103ee..24d72ad553b 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc @@ -572,7 +572,7 @@ static void calculate_curve_fillet(GeometrySet &geometry_set, const std::optional<Field<int>> &count_field, const bool limit_radius) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc index c7c822db983..d5769c691c8 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_length.cc @@ -14,11 +14,11 @@ static void node_declare(NodeDeclarationBuilder &b) static void node_geo_exec(GeoNodeExecParams params) { GeometrySet curve_set = params.extract_input<GeometrySet>("Curve"); - if (!curve_set.has_curve()) { + if (!curve_set.has_curves()) { params.set_default_remaining_outputs(); return; } - const std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curve_set.get_curve_for_read()); + const std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curve_set.get_curves_for_read()); float length = 0.0f; for (const SplinePtr &spline : curve->splines()) { length += spline->length(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc index 9fbc01935ce..339e65321b1 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc @@ -335,7 +335,7 @@ static void node_geo_exec(GeoNodeExecParams params) r_center, r_normal, r_radius); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); params.set_output("Center", r_center); params.set_output("Normal", r_normal); params.set_output("Radius", r_radius); @@ -350,7 +350,7 @@ static void node_geo_exec(GeoNodeExecParams params) params.extract_input<bool>("Connect Center"), params.extract_input<bool>("Invert Arc")); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); break; } } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc index eabd6aa1aa0..78e1613b630 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc @@ -113,7 +113,7 @@ static void node_geo_exec(GeoNodeExecParams params) params.extract_input<float3>("End Handle"), std::max(params.extract_input<int>("Resolution"), 1), mode); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_curve_primitive_bezier_segment_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc index 73929dce1af..54d7c488fb7 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc @@ -203,7 +203,7 @@ static void node_geo_exec(GeoNodeExecParams params) } if (curve) { - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } else { params.set_default_remaining_outputs(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc index 066947de496..ece7e44cc35 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc @@ -111,7 +111,7 @@ static void node_geo_exec(GeoNodeExecParams params) params.extract_input<float>("Length")); } - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_curve_primitive_line_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc index 1b055a3a3d5..c6c33cffa54 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc @@ -61,7 +61,7 @@ static void node_geo_exec(GeoNodeExecParams params) params.extract_input<float3>("Middle"), params.extract_input<float3>("End"), std::max(params.extract_input<int>("Resolution"), 3)); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc index 7842ad028b7..cc2b9e4bc4e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc @@ -264,7 +264,7 @@ static void node_geo_exec(GeoNodeExecParams params) curve->add_spline(std::move(spline)); curve->attributes.reallocate(curve->splines().size()); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_curve_primitive_quadrilateral_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc index d5bc70e37cd..d4f7c4ed5f1 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc @@ -86,7 +86,7 @@ static void node_geo_exec(GeoNodeExecParams params) params.extract_input<float>("End Radius"), params.extract_input<float>("Height"), params.extract_input<bool>("Reverse")); - params.set_output("Curve", GeometrySet::create_with_curve(curve_eval_to_curves(*curve))); + params.set_output("Curve", GeometrySet::create_with_curves(curve_eval_to_curves(*curve))); } } // namespace blender::nodes::node_geo_curve_primitive_spiral_cc diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc index e02bcfb73cc..5b6852abfc2 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc @@ -83,7 +83,7 @@ static void node_geo_exec(GeoNodeExecParams params) std::max(params.extract_input<float>("Outer Radius"), 0.0f), params.extract_input<float>("Twist"), std::max(params.extract_input<int>("Points"), 3)); - GeometrySet output = GeometrySet::create_with_curve(curve_eval_to_curves(*curve)); + GeometrySet output = GeometrySet::create_with_curves(curve_eval_to_curves(*curve)); if (params.output_is_required("Outer Points")) { StrongAnonymousAttributeID attribute_output("Outer Points"); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc index fffc6188dfd..c5814a9a1dd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc @@ -235,7 +235,7 @@ static std::unique_ptr<CurveEval> resample_curve(const CurveComponent *component static void geometry_set_curve_resample(GeometrySet &geometry_set, const SampleModeParam &mode_param) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc index 06ca0483063..8393f9615aa 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc @@ -20,7 +20,7 @@ static void node_geo_exec(GeoNodeExecParams params) GeometrySet geometry_set = params.extract_input<GeometrySet>("Curve"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc index 222c28dd21b..6661d03a851 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc @@ -122,7 +122,7 @@ class SampleCurveFunction : public fn::MultiFunction { } }; - if (!geometry_set_.has_curve()) { + if (!geometry_set_.has_curves()) { return return_default(); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_set_handles.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_set_handles.cc index a892ff419e5..e8da4154586 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_set_handles.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_set_handles.cc @@ -60,7 +60,7 @@ static void node_geo_exec(GeoNodeExecParams params) bool has_bezier_spline = false; geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc index d691726da27..55610ec86ab 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc @@ -362,7 +362,7 @@ static void node_geo_exec(GeoNodeExecParams params) Field<bool> selection_field = params.extract_input<Field<bool>>("Selection"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc index 3297ddcae85..bbe57b2b3fa 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc @@ -324,7 +324,7 @@ static void node_geo_exec(GeoNodeExecParams params) Field<int> cuts_field = params.extract_input<Field<int>>("Cuts"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc index 753a6fe7278..e7a8c61290b 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc @@ -28,8 +28,8 @@ static void geometry_set_curve_to_mesh(GeometrySet &geometry_set, const bool fill_caps) { const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); - const Curves *profile_curves = profile_set.get_curve_for_read(); + *geometry_set.get_curves_for_read()); + const Curves *profile_curves = profile_set.get_curves_for_read(); if (profile_curves == nullptr) { Mesh *mesh = bke::curve_to_wire_mesh(*curve); @@ -48,10 +48,10 @@ static void node_geo_exec(GeoNodeExecParams params) GeometrySet profile_set = params.extract_input<GeometrySet>("Profile Curve"); const bool fill_caps = params.extract_input<bool>("Fill Caps"); - bool has_curve = false; + bool has_curves = false; curve_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { - has_curve = true; + if (geometry_set.has_curves()) { + has_curves = true; geometry_set_curve_to_mesh(geometry_set, profile_set, fill_caps); } geometry_set.keep_only({GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_INSTANCES}); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index 33e7a818c87..1eb18b2f910 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -321,12 +321,12 @@ static void node_geo_exec(GeoNodeExecParams params) attribute_outputs.rotation_id = StrongAnonymousAttributeID("Rotation"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { geometry_set.keep_only({GEO_COMPONENT_TYPE_INSTANCES}); return; } const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); const Span<SplinePtr> splines = curve->splines(); curve->assert_valid_point_attributes(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc index 649391a2346..a3dab1b50fe 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc @@ -500,7 +500,7 @@ static void geometry_set_curve_trim(GeometrySet &geometry_set, Field<float> &start_field, Field<float> &end_field) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { return; } @@ -515,7 +515,7 @@ static void geometry_set_curve_trim(GeometrySet &geometry_set, const blender::VArray<float> &starts = evaluator.get_evaluated<float>(0); const blender::VArray<float> &ends = evaluator.get_evaluated<float>(1); - std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*geometry_set.get_curve_for_read()); + std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*geometry_set.get_curves_for_read()); MutableSpan<SplinePtr> splines = curve->splines(); threading::parallel_for(splines.index_range(), 128, [&](IndexRange range) { diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc index 9fc71ebe8d1..3baee8a25bb 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc @@ -1286,7 +1286,7 @@ void separate_geometry(GeometrySet &geometry_set, some_valid_domain = true; } } - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { if (ELEM(domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE)) { file_ns::separate_curve_selection(geometry_set, selection_field, domain, invert); some_valid_domain = true; 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 41f1e6663d3..c58bab239e6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc @@ -521,7 +521,7 @@ static void duplicate_splines(GeometrySet &geometry_set, const Field<bool> &selection_field, IndexAttributes &attributes) { - if (!geometry_set.has_curve()) { + if (!geometry_set.has_curves()) { geometry_set.keep_only({GEO_COMPONENT_TYPE_INSTANCES}); return; } @@ -530,7 +530,7 @@ static void duplicate_splines(GeometrySet &geometry_set, const GeometryComponent &src_component = *geometry_set.get_component_for_read( GEO_COMPONENT_TYPE_CURVE); const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); const int domain_size = src_component.attribute_domain_size(ATTR_DOMAIN_CURVE); GeometryComponentFieldContext field_context{src_component, ATTR_DOMAIN_CURVE}; FieldEvaluator evaluator{field_context, domain_size}; @@ -788,7 +788,7 @@ static void duplicate_points_curve(const GeometryComponentType component_type, CurveComponent &curve_component = geometry_set.get_component_for_write<CurveComponent>(); const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); Array<int> control_point_offsets = curve->control_point_offsets(); std::unique_ptr<CurveEval> new_curve = std::make_unique<CurveEval>(); @@ -933,7 +933,7 @@ static void duplicate_points(GeometrySet &geometry_set, const Field<bool> &selection_field, IndexAttributes &attributes) { - if (!geometry_set.has_mesh() && !geometry_set.has_curve() && !geometry_set.has_pointcloud()) { + if (!geometry_set.has_mesh() && !geometry_set.has_curves() && !geometry_set.has_pointcloud()) { geometry_set.keep_only({GEO_COMPONENT_TYPE_INSTANCES}); return; } diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc index 85b042ddb9b..301410f5126 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc @@ -141,9 +141,9 @@ static void node_geo_exec(GeoNodeExecParams params) bool has_bezier = false; geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); has_bezier = curve->has_spline_with_type(CURVE_TYPE_BEZIER); set_position_in_component(mode, diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_radius.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_radius.cc index 2f59d008df0..a23a6c09551 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_radius.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_radius.cc @@ -44,7 +44,7 @@ static void node_geo_exec(GeoNodeExecParams params) Field<float> radii_field = params.extract_input<Field<float>>("Radius"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { set_radius_in_component( geometry_set.get_component_for_write<CurveComponent>(), selection_field, radii_field); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_curve_tilt.cc b/source/blender/nodes/geometry/nodes/node_geo_set_curve_tilt.cc index b94782b8c4c..1155c97dc38 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_curve_tilt.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_curve_tilt.cc @@ -40,7 +40,7 @@ static void node_geo_exec(GeoNodeExecParams params) Field<float> tilt_field = params.extract_input<Field<float>>("Tilt"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { set_tilt_in_component( geometry_set.get_component_for_write<CurveComponent>(), selection_field, tilt_field); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc b/source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc index 70e363064cd..dc7f3b1343a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc @@ -40,7 +40,7 @@ static void node_geo_exec(GeoNodeExecParams params) Field<bool> cyclic_field = params.extract_input<Field<bool>>("Cyclic"); geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { set_cyclic_in_component( geometry_set.get_component_for_write<CurveComponent>(), selection_field, cyclic_field); } diff --git a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc index e1c252d0081..da8d7bcf255 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc @@ -43,10 +43,10 @@ static void node_geo_exec(GeoNodeExecParams params) bool only_poly = true; geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { - if (geometry_set.has_curve()) { + if (geometry_set.has_curves()) { if (only_poly) { const std::unique_ptr<CurveEval> curve = curves_to_curve_eval( - *geometry_set.get_curve_for_read()); + *geometry_set.get_curves_for_read()); for (const SplinePtr &spline : curve->splines()) { if (ELEM(spline->type(), CURVE_TYPE_BEZIER, CURVE_TYPE_NURBS)) { only_poly = false; diff --git a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc index 45156e0cbf8..bc34a1a6f2c 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc @@ -298,7 +298,7 @@ static Map<int, int> create_curve_instances(GeoNodeExecParams ¶ms, layout.pivot_points.add_new(layout.char_codes[i], pivot_point); } - GeometrySet geometry_set_curve = GeometrySet::create_with_curve( + GeometrySet geometry_set_curve = GeometrySet::create_with_curves( curve_eval_to_curves(*curve_eval)); handles.add_new(layout.char_codes[i], instance_component.add_reference(std::move(geometry_set_curve))); diff --git a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc index 789478873f6..2d5b0e58367 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc @@ -778,7 +778,7 @@ static void node_geo_exec(GeoNodeExecParams params) break; } case GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST: { - if (geometry.has_curve() && !geometry.has_mesh() && !geometry.has_pointcloud()) { + if (geometry.has_curves() && !geometry.has_mesh() && !geometry.has_pointcloud()) { params.error_message_add(NodeWarningType::Error, TIP_("The source geometry must contain a mesh or a point cloud")); return return_default(); diff --git a/source/blender/nodes/geometry/nodes/node_geo_transform.cc b/source/blender/nodes/geometry/nodes/node_geo_transform.cc index 045dea77f38..95cec8eab11 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_transform.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_transform.cc @@ -126,7 +126,7 @@ static void translate_geometry_set(GeometrySet &geometry, const float3 translation, const Depsgraph &depsgraph) { - if (Curves *curves = geometry.get_curve_for_write()) { + if (Curves *curves = geometry.get_curves_for_write()) { std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves); curve->translate(translation); geometry.replace_curve(curve_eval_to_curves(*curve)); @@ -149,7 +149,7 @@ void transform_geometry_set(GeometrySet &geometry, const float4x4 &transform, const Depsgraph &depsgraph) { - if (Curves *curves = geometry.get_curve_for_write()) { + if (Curves *curves = geometry.get_curves_for_write()) { std::unique_ptr<CurveEval> curve = curves_to_curve_eval(*curves); curve->transform(transform); geometry.replace_curve(curve_eval_to_curves(*curve)); |