[Bf-blender-cvs] [245722866d6] master: Cleanup: Rename geometry set "curve" functions to "curves"
Hans Goudey
noreply at git.blender.org
Mon Feb 28 16:53:53 CET 2022
Commit: 245722866d6977c8b440e0f468ebf6528d3970e1
Author: Hans Goudey
Date: Mon Feb 28 10:53:30 2022 -0500
Branches: master
https://developer.blender.org/rB245722866d6977c8b440e0f468ebf6528d3970e1
Cleanup: Rename geometry set "curve" functions to "curves"
Ref T95355
===================================================================
M source/blender/blenkernel/BKE_geometry_set.hh
M source/blender/blenkernel/intern/displist.cc
M source/blender/blenkernel/intern/geometry_set.cc
M source/blender/blenkernel/intern/mesh_convert.cc
M source/blender/geometry/intern/realize_instances.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_endpoints.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_reverse.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_set_handles.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_spline_type.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_subdivide.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_curve_to_points.cc
M source/blender/nodes/geometry/nodes/legacy/node_geo_legacy_mesh_to_curve.cc
M source/blender/nodes/geometry/nodes/node_geo_attribute_domain_size.cc
M source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_fill.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_length.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_arc.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_bezier_segment.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_circle.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_line.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadratic_bezier.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_quadrilateral.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_spiral.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_primitive_star.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_resample.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_reverse.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_sample.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_set_handles.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_subdivide.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_to_mesh.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc
M source/blender/nodes/geometry/nodes/node_geo_curve_trim.cc
M source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
M source/blender/nodes/geometry/nodes/node_geo_duplicate_elements.cc
M source/blender/nodes/geometry/nodes/node_geo_set_curve_handles.cc
M source/blender/nodes/geometry/nodes/node_geo_set_curve_radius.cc
M source/blender/nodes/geometry/nodes/node_geo_set_curve_tilt.cc
M source/blender/nodes/geometry/nodes/node_geo_set_spline_cyclic.cc
M source/blender/nodes/geometry/nodes/node_geo_set_spline_resolution.cc
M source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
M source/blender/nodes/geometry/nodes/node_geo_transfer_attribute.cc
M source/blender/nodes/geometry/nodes/node_geo_transform.cc
===================================================================
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::
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list