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/blender/blenkernel | |
parent | 9ec12c26f16ea3da1e6de95d5d5daf1057464830 (diff) |
Cleanup: Rename geometry set "curve" functions to "curves"
Ref T95355
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 18 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/displist.cc | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/geometry_set.cc | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_convert.cc | 2 |
4 files changed, 19 insertions, 19 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; } |