[Bf-blender-cvs] [1dae11ccb5f] master: Cleanup: Improve comments

Mattias Fredriksson noreply at git.blender.org
Thu Aug 25 00:31:00 CEST 2022


Commit: 1dae11ccb5f9aea099d8f52ae32138bed02d946f
Author: Mattias Fredriksson
Date:   Wed Aug 24 18:11:55 2022 -0400
Branches: master
https://developer.blender.org/rB1dae11ccb5f9aea099d8f52ae32138bed02d946f

Cleanup: Improve comments

Add to comments in curves header, fix typo in attribute header.

Ref D14481

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

M	source/blender/blenkernel/BKE_attribute.hh
M	source/blender/blenkernel/BKE_curves.hh
M	source/blender/makesdna/DNA_curves_types.h

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

diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh
index 1e61e477759..d29c60a7373 100644
--- a/source/blender/blenkernel/BKE_attribute.hh
+++ b/source/blender/blenkernel/BKE_attribute.hh
@@ -150,7 +150,7 @@ template<typename T> struct AttributeReader {
 };
 
 /**
- * Result when looking up an attribute from some geometry with read an write access. After writing
+ * Result when looking up an attribute from some geometry with read and write access. After writing
  * to the attribute, the #finish method has to be called. This may invalidate caches based on this
  * attribute.
  */
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh
index 4c2e68af650..8d17fe56156 100644
--- a/source/blender/blenkernel/BKE_curves.hh
+++ b/source/blender/blenkernel/BKE_curves.hh
@@ -150,7 +150,13 @@ class CurvesGeometry : public ::CurvesGeometry {
    * Accessors.
    */
 
+  /**
+   * The total number of control points in all curves.
+   */
   int points_num() const;
+  /**
+   * The number of curves in the data-block.
+   */
   int curves_num() const;
   IndexRange points_range() const;
   IndexRange curves_range() const;
@@ -553,7 +559,7 @@ void calculate_evaluated_offsets(Span<int8_t> handle_types_left,
                                  int resolution,
                                  MutableSpan<int> evaluated_offsets);
 
-/** See #insert. */
+/** Knot insertion result, see #insert. */
 struct Insertion {
   float3 handle_prev;
   float3 left_handle;
@@ -563,8 +569,12 @@ struct Insertion {
 };
 
 /**
- * Compute the Bezier segment insertion for the given parameter on the segment, returning
- * the position and handles of the new point and the updated existing handle positions.
+ * Compute the insertion of a control point and handles in a Bezier segment without changing its
+ * shape.
+ * \param parameter: Factor in from 0 to 1 defining the insertion point within the segment.
+ * \return Inserted point paramaters including position, and both new and updated handles for
+ * neighbouring control points.
+ *
  * <pre>
  *           handle_prev         handle_next
  *                x-----------------x
diff --git a/source/blender/makesdna/DNA_curves_types.h b/source/blender/makesdna/DNA_curves_types.h
index 89deeec898b..6c38d316508 100644
--- a/source/blender/makesdna/DNA_curves_types.h
+++ b/source/blender/makesdna/DNA_curves_types.h
@@ -30,6 +30,7 @@ typedef enum CurveType {
   CURVE_TYPE_BEZIER = 2,
   CURVE_TYPE_NURBS = 3,
 } CurveType;
+/* The number of supported curve types. */
 #define CURVE_TYPES_NUM 4
 
 typedef enum HandleType {



More information about the Bf-blender-cvs mailing list