[Bf-blender-cvs] [a5761bbde20] master: Cleanup: Whitespace, add doxygen sections

Hans Goudey noreply at git.blender.org
Tue May 11 02:30:30 CEST 2021


Commit: a5761bbde206e31bd03e2092b52040c8d297feff
Author: Hans Goudey
Date:   Mon May 10 19:30:23 2021 -0500
Branches: master
https://developer.blender.org/rBa5761bbde206e31bd03e2092b52040c8d297feff

Cleanup: Whitespace, add doxygen sections

The sections aren't helpful at the moment, but I will add more code
here soon that will benefit more from the visual separation.

===================================================================

M	source/blender/blenkernel/intern/geometry_component_curve.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 503670861a5..7afecb66bcc 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -115,7 +115,7 @@ void CurveComponent::ensure_owns_direct_data()
 /** \} */
 
 /* -------------------------------------------------------------------- */
-/** \name Attribute Access
+/** \name Attribute Access Helper Functions
  * \{ */
 
 int CurveComponent::attribute_domain_size(const AttributeDomain domain) const
@@ -150,12 +150,19 @@ static const CurveEval *get_curve_from_component_for_read(const GeometryComponen
   return curve_component.get_for_read();
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Builtin Spline Attributes
+ *
+ * Attributes with a value for every spline, stored contiguously or in every spline separately.
+ * \{ */
+
 namespace blender::bke {
 
 class BuiltinSplineAttributeProvider final : public BuiltinAttributeProvider {
   using AsReadAttribute = GVArrayPtr (*)(const CurveEval &data);
   using AsWriteAttribute = GVMutableArrayPtr (*)(CurveEval &data);
-  using UpdateOnWrite = void (*)(Spline &spline);
   const AsReadAttribute as_read_attribute_;
   const AsWriteAttribute as_write_attribute_;
 
@@ -182,7 +189,6 @@ class BuiltinSplineAttributeProvider final : public BuiltinAttributeProvider {
     if (curve == nullptr) {
       return {};
     }
-
     return as_read_attribute_(*curve);
   }
 
@@ -195,7 +201,6 @@ class BuiltinSplineAttributeProvider final : public BuiltinAttributeProvider {
     if (curve == nullptr) {
       return {};
     }
-
     return as_write_attribute_(*curve);
   }
 
@@ -278,6 +283,12 @@ static GVMutableArrayPtr make_cyclic_write_attribute(CurveEval &curve)
       curve.splines.as_mutable_span());
 }
 
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Attribute Provider Declaration
+ * \{ */
+
 /**
  * In this function all the attribute providers for a curve component are created. Most data
  * in this function is statically allocated, because it does not change over time.



More information about the Bf-blender-cvs mailing list