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>2021-05-11 03:30:23 +0300
committerHans Goudey <h.goudey@me.com>2021-05-11 03:30:23 +0300
commita5761bbde206e31bd03e2092b52040c8d297feff (patch)
treea3c0549d07e63063bcc0a90815f4ca460b11ace3 /source/blender/blenkernel/intern/geometry_component_curve.cc
parent6b1034d5203e1040bc9211cb765fa1cc3c05b7e2 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/geometry_component_curve.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc19
1 files changed, 15 insertions, 4 deletions
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.