[Bf-blender-cvs] [6f389f1bb85] master: Cleanup: move public doc-strings into headers

Campbell Barton noreply at git.blender.org
Thu Jan 6 09:25:45 CET 2022


Commit: 6f389f1bb856df2a1d9d29bc542b5ad76748a84e
Author: Campbell Barton
Date:   Thu Jan 6 19:00:35 2022 +1100
Branches: master
https://developer.blender.org/rB6f389f1bb856df2a1d9d29bc542b5ad76748a84e

Cleanup: move public doc-strings into headers

Some recent changes re-introduced public-style doc-strings
in the source file.

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

M	source/blender/blenkernel/BKE_gpencil_modifier.h
M	source/blender/blenkernel/intern/gpencil_modifier.c
M	source/blender/blenlib/BLI_serialize.hh
M	source/blender/blenloader/intern/versioning_300.c
M	source/blender/blenloader/intern/versioning_common.cc
M	source/blender/blenloader/intern/versioning_common.h
M	source/blender/editors/animation/keyframes_general.c
M	source/blender/editors/animation/keyframes_keylist.cc
M	source/blender/editors/include/ED_keyframes_edit.h
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/gpu/intern/gpu_backend.hh
M	source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
M	source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh
M	source/blender/io/wavefront_obj/exporter/obj_export_mesh.cc
M	source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
M	source/blender/io/wavefront_obj/exporter/obj_export_nurbs.cc
M	source/blender/io/wavefront_obj/exporter/obj_export_nurbs.hh
M	source/blender/io/wavefront_obj/exporter/obj_exporter.cc
M	source/blender/io/wavefront_obj/exporter/obj_exporter.hh

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

diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index 5fc0abf6a2c..6c8edf598f1 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -407,7 +407,15 @@ void BKE_gpencil_set_lineart_modifier_limits(struct GpencilModifierData *md,
 bool BKE_gpencil_is_first_lineart_in_stack(const struct Object *ob,
                                            const struct GpencilModifierData *md);
 
+/**
+ * Init grease pencil cache deform data.
+ * \param ob: Grease pencil object
+ */
 void BKE_gpencil_cache_data_init(struct Depsgraph *depsgraph, struct Object *ob);
+/**
+ * Clear grease pencil cache deform data.
+ * \param ob: Grease pencil object
+ */
 void BKE_gpencil_cache_data_clear(struct Object *ob);
 
 /**
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c
index 62604286b43..74db151261f 100644
--- a/source/blender/blenkernel/intern/gpencil_modifier.c
+++ b/source/blender/blenkernel/intern/gpencil_modifier.c
@@ -79,10 +79,6 @@ static GpencilVirtualModifierData virtualModifierCommonData;
  * each loop over all the geometry being evaluated.
  */
 
-/**
- * Init grease pencil cache deform data.
- * \param ob: Grease pencil object
- */
 void BKE_gpencil_cache_data_init(Depsgraph *depsgraph, Object *ob)
 {
   LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
@@ -131,10 +127,6 @@ void BKE_gpencil_cache_data_init(Depsgraph *depsgraph, Object *ob)
   }
 }
 
-/**
- * Clear grease pencil cache deform data.
- * \param ob: Grease pencil object
- */
 void BKE_gpencil_cache_data_clear(Object *ob)
 {
   LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {
diff --git a/source/blender/blenlib/BLI_serialize.hh b/source/blender/blenlib/BLI_serialize.hh
index 5945960c450..05606794994 100644
--- a/source/blender/blenlib/BLI_serialize.hh
+++ b/source/blender/blenlib/BLI_serialize.hh
@@ -123,7 +123,7 @@ using ArrayValue = ContainerValue<Vector<std::shared_ptr<Value>>, eValueType::Ar
  * - `BooleanValue`: contains a boolean (true/false).
  * - `DoubleValue`: contains a double precision floating point number.
  * - `DictionaryValue`: represents an object (key value pairs where keys are strings and values can
- * be of different types.
+ *   be of different types.
  *
  */
 class Value {
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 035aa293b62..5a93e81d2b1 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -2527,4 +2527,4 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
       }
     }
   }
-}
\ No newline at end of file
+}
diff --git a/source/blender/blenloader/intern/versioning_common.cc b/source/blender/blenloader/intern/versioning_common.cc
index 752157bffde..575bfd565e6 100644
--- a/source/blender/blenloader/intern/versioning_common.cc
+++ b/source/blender/blenloader/intern/versioning_common.cc
@@ -224,10 +224,6 @@ void version_node_socket_index_animdata(Main *bmain,
   }
 }
 
-/**
- * The versioning code generally expects `SOCK_IN_USE` to be set correctly. This function updates
- * the flag on all sockets after changes to the node tree.
- */
 void version_socket_update_is_used(bNodeTree *ntree)
 {
   LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
diff --git a/source/blender/blenloader/intern/versioning_common.h b/source/blender/blenloader/intern/versioning_common.h
index dd1dd1f22f2..9e13cc45103 100644
--- a/source/blender/blenloader/intern/versioning_common.h
+++ b/source/blender/blenloader/intern/versioning_common.h
@@ -100,6 +100,10 @@ struct bNodeSocket *version_node_add_socket_if_not_exist(struct bNodeTree *ntree
                                                          const char *identifier,
                                                          const char *name);
 
+/**
+ * The versioning code generally expects `SOCK_IN_USE` to be set correctly. This function updates
+ * the flag on all sockets after changes to the node tree.
+ */
 void version_socket_update_is_used(bNodeTree *ntree);
 
 #ifdef __cplusplus
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 8aac1e9b779..5d82b3b9939 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -345,10 +345,6 @@ static bool find_fcurve_segment(FCurve *fcu,
   return in_segment;
 }
 
-/* Return a list of FCurveSegment with a start index and a length.
- * A segment is a continuous selection of keyframes.
- * Keys that have BEZT_FLAG_IGNORE_TAG set are treated as unselected.
- * The caller is responsible for freeing the memory. */
 ListBase find_fcurve_segments(FCurve *fcu)
 {
   ListBase segments = {NULL, NULL};
diff --git a/source/blender/editors/animation/keyframes_keylist.cc b/source/blender/editors/animation/keyframes_keylist.cc
index 8dae46766fa..e4641ead2d2 100644
--- a/source/blender/editors/animation/keyframes_keylist.cc
+++ b/source/blender/editors/animation/keyframes_keylist.cc
@@ -850,7 +850,6 @@ bool actkeyblock_is_valid(const ActKeyColumn *ac)
   return ac != nullptr && ac->next != nullptr && ac->totblock > 0;
 }
 
-/* Checks if ActKeyBlock should exist... */
 int actkeyblock_get_valid_hold(const ActKeyColumn *ac)
 {
   /* check that block is valid */
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index c54fb93e495..d08abf8aab8 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -327,13 +327,13 @@ KeyframeEditFunc ANIM_editkeyframes_easing(short mode);
 
 /**
  * Get a callback to populate the selection settings map
- * requires: ked->custom = char[] of length fcurve->totvert.
+ * requires: `ked->custom = char[]` of length `fcurve->totvert`.
  */
 KeyframeEditFunc ANIM_editkeyframes_buildselmap(short mode);
 
 /**
  * Change the selection status of the keyframe based on the map entry for this vert
- * requires: ked->custom = char[] of length fcurve->totvert.
+ * requires: `ked->custom = char[]` of length `fcurve->totvert`.
  */
 short bezt_selmap_flush(KeyframeEditData *ked, struct BezTriple *bezt);
 
@@ -384,6 +384,13 @@ typedef struct FCurveSegment {
   struct FCurveSegment *next, *prev;
   int start_index, length;
 } FCurveSegment;
+
+/**
+ * Return a list of #FCurveSegment with a start index and a length.
+ * A segment is a continuous selection of keyframes.
+ * Keys that have BEZT_FLAG_IGNORE_TAG set are treated as unselected.
+ * The caller is responsible for freeing the memory.
+ */
 ListBase find_fcurve_segments(struct FCurve *fcu);
 void clean_fcurve(struct bAnimContext *ac,
                   struct bAnimListElem *ale,
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index fd550790f2e..21bbc9fb543 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2128,10 +2128,6 @@ bool SCULPT_pbvh_calc_area_normal(const Brush *brush,
   return data.any_vertex_sampled;
 }
 
-/**
- * This calculates flatten center and area normal together,
- * amortizing the memory bandwidth and loop overhead to calculate both at the same time.
- */
 void SCULPT_calc_area_normal_and_center(
     Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3], float r_area_co[3])
 {
@@ -3963,8 +3959,7 @@ static const char *sculpt_tool_name(Sculpt *sd)
   return "Sculpting";
 }
 
-/**
- * Operator for applying a stroke (various attributes including mouse path)
+/* Operator for applying a stroke (various attributes including mouse path)
  * using the current brush. */
 
 void SCULPT_cache_free(StrokeCache *cache)
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 35ffb214185..f239d12b69e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -300,6 +300,10 @@ void SCULPT_calc_brush_plane(struct Sculpt *sd,
 
 void SCULPT_calc_area_normal(
     Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3]);
+/**
+ * This calculates flatten center and area normal together,
+ * amortizing the memory bandwidth and loop overhead to calculate both at the same time.
+ */
 void SCULPT_calc_area_normal_and_center(
     Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float r_area_no[3], float r_area_co[3]);
 void SCULPT_calc_area_center(
diff --git a/source/blender/gpu/intern/gpu_backend.hh b/source/blender/gpu/intern/gpu_backend.hh
index d472e48776e..00645f34173 100644
--- a/source/blender/gpu/intern/gpu_backend.hh
+++ b/source/blender/gpu/intern/gpu_backend.hh
@@ -42,7 +42,7 @@ class VertBuf;
 
 class GPUBackend {
  public:
-  virtual ~GPUBackend()= default;;
+  virtual ~GPUBackend() = default;
 
   static GPUBackend *get();
 
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
index 8c4ae7e111e..45fa75c65b3 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc
@@ -52,9 +52,6 @@ const char *DEFORM_GROUP_DISABLED = "off";
  * So an empty material name is written. */
 const char *MATERIAL_GROUP_DISABLED = "";
 
-/**
- * Write one line of polygon indices as "f v1/vt1/vn1 v2/vt2/vn2 ...".
- */
 void OBJWriter::write_vert_uv_normal_indices(Span<int> vert_indices,
                                              Span<int> uv_indices,
                                              Span<int> normal_indices) const
@@ -71,9 +68,6 @@ void OBJWriter::write_vert_uv_normal_indices(Span<int> vert_indices,
   file_handler_->write<eOBJSyntaxElement::poly_element_end>();
 }
 
-/**
- * Write one line of polygon indices as "f v1//vn1 v2//vn2 ...".
- */
 void OBJWriter::write_vert_normal_indi

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list