[Bf-blender-cvs] [36c6b2e893b] master: Cleanup: spelling in comments

Campbell Barton noreply at git.blender.org
Mon Dec 13 06:23:00 CET 2021


Commit: 36c6b2e893b89f6b378f60fb975f73d47b248027
Author: Campbell Barton
Date:   Mon Dec 13 16:22:20 2021 +1100
Branches: master
https://developer.blender.org/rB36c6b2e893b89f6b378f60fb975f73d47b248027

Cleanup: spelling in comments

Also move notes about where noise functions come from
into the function body as it's not relavant to the public doc-string.

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

M	source/blender/blenlib/BLI_math_geom.h
M	source/blender/blenlib/BLI_noise.hh
M	source/blender/blenlib/intern/noise.cc
M	source/blender/editors/include/ED_mesh.h
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/screen/screen_intern.h
M	source/blender/functions/intern/multi_function_procedure_executor.cc
M	source/blender/windowmanager/wm_event_types.h

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

diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 539bb338032..a4c3c43ebd3 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -333,8 +333,8 @@ double closest_to_line_v2_db(double r_close[2],
                              const double l1[2],
                              const double l2[2]);
 /**
- * Find closest point to p on line through (l1, l2) and return lambda,
- * where (0 <= lambda <= 1) when cp is in the line segment (l1, l2).
+ * Find closest point to p on line through (`l1`, `l2`) and return lambda,
+ * where (0 <= lambda <= 1) when `p` is in the line segment (`l1`, `l2`).
  */
 float closest_to_line_v3(float r_close[3], const float p[3], const float l1[3], const float l2[3]);
 /**
diff --git a/source/blender/blenlib/BLI_noise.hh b/source/blender/blenlib/BLI_noise.hh
index ae80a98c45f..44af2c44f00 100644
--- a/source/blender/blenlib/BLI_noise.hh
+++ b/source/blender/blenlib/BLI_noise.hh
@@ -245,8 +245,6 @@ float musgrave_hybrid_multi_fractal(const float4 co,
  * \param H: fractal increment parameter.
  * \param lacunarity: gap between successive frequencies.
  * \param octaves: number of frequencies in the fBm.
- *
- * \param from "Texturing and Modelling: A procedural approach".
  */
 float musgrave_fBm(const float co, const float H, const float lacunarity, const float octaves);
 
@@ -256,8 +254,6 @@ float musgrave_fBm(const float co, const float H, const float lacunarity, const
  * \param H: fractal increment parameter.
  * \param lacunarity: gap between successive frequencies.
  * \param octaves: number of frequencies in the fBm.
- *
- * \param from "Texturing and Modelling: A procedural approach".
  */
 float musgrave_fBm(const float2 co, const float H, const float lacunarity, const float octaves);
 /**
@@ -266,8 +262,6 @@ float musgrave_fBm(const float2 co, const float H, const float lacunarity, const
  * \param H: fractal increment parameter.
  * \param lacunarity: gap between successive frequencies.
  * \param octaves: number of frequencies in the fBm.
- *
- * \param from "Texturing and Modelling: A procedural approach".
  */
 float musgrave_fBm(const float3 co, const float H, const float lacunarity, const float octaves);
 /**
@@ -276,8 +270,6 @@ float musgrave_fBm(const float3 co, const float H, const float lacunarity, const
  * \param H: fractal increment parameter.
  * \param lacunarity: gap between successive frequencies.
  * \param octaves: number of frequencies in the fBm.
- *
- * \param from "Texturing and Modelling: A procedural approach".
  */
 float musgrave_fBm(const float4 co, const float H, const float lacunarity, const float octaves);
 
diff --git a/source/blender/blenlib/intern/noise.cc b/source/blender/blenlib/intern/noise.cc
index 56ff4feb42e..a6ad18801fd 100644
--- a/source/blender/blenlib/intern/noise.cc
+++ b/source/blender/blenlib/intern/noise.cc
@@ -768,6 +768,8 @@ float musgrave_fBm(const float co,
                    const float lacunarity,
                    const float octaves_unclamped)
 {
+  /* From "Texturing and Modelling: A procedural approach". */
+
   float p = co;
   float value = 0.0f;
   float pwr = 1.0f;
@@ -917,6 +919,8 @@ float musgrave_fBm(const float2 co,
                    const float lacunarity,
                    const float octaves_unclamped)
 {
+  /* From "Texturing and Modelling: A procedural approach". */
+
   float2 p = co;
   float value = 0.0f;
   float pwr = 1.0f;
@@ -1067,6 +1071,8 @@ float musgrave_fBm(const float3 co,
                    const float lacunarity,
                    const float octaves_unclamped)
 {
+  /* From "Texturing and Modelling: A procedural approach". */
+
   float3 p = co;
   float value = 0.0f;
   float pwr = 1.0f;
@@ -1219,6 +1225,8 @@ float musgrave_fBm(const float4 co,
                    const float lacunarity,
                    const float octaves_unclamped)
 {
+  /* From "Texturing and Modelling: A procedural approach". */
+
   float4 p = co;
   float value = 0.0f;
   float pwr = 1.0f;
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index e6a064a3f51..35838f4ce48 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -229,7 +229,7 @@ void EDBM_select_mirrored(struct BMEditMesh *em,
  * actual distance.
  * \param use_select_bias:
  * - When true, selected vertices are given a 5 pixel bias
- *   to make them further than unselect verts.
+ *   to make them further than unselected vertices.
  * - When false, unselected vertices are given the bias.
  * \param use_cycle: Cycle over elements within #FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index.
  */
@@ -570,7 +570,7 @@ bool ED_mesh_uv_texture_remove_active(struct Mesh *me);
 bool ED_mesh_uv_texture_remove_named(struct Mesh *me, const char *name);
 void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me);
 /**
- * Without bContext, called in uvedit.
+ * Without a #bContext, called when UV-editing.
  */
 void ED_mesh_uv_loop_reset_ex(struct Mesh *me, const int layernum);
 bool ED_mesh_color_ensure(struct Mesh *me, const char *name);
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 11a8b11c35a..a4f07248d71 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -1161,7 +1161,7 @@ float ED_view3d_offset_distance(const float mat[4][4],
 /**
  * Set the dist without moving the view (compensate with #RegionView3D.ofs)
  *
- * \note take care that viewinv is up to date, #ED_view3d_update_viewmat first.
+ * \note take care that #RegionView3d.viewinv is up to date, #ED_view3d_update_viewmat first.
  */
 void ED_view3d_distance_set(struct RegionView3D *rv3d, const float dist);
 /**
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index 53d87005463..bc06e46ba96 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -90,7 +90,7 @@ void screen_draw_split_preview(struct ScrArea *area, const eScreenAxis dir_axis,
 /* screen_edit.c */
 
 /**
- * Empty screen, with 1 dummy area without spacedata. Uses window size.
+ * Empty screen, with 1 dummy area without space-data. Uses window size.
  */
 bScreen *screen_add(struct Main *bmain, const char *name, const rcti *rect);
 void screen_data_copy(bScreen *to, bScreen *from);
diff --git a/source/blender/functions/intern/multi_function_procedure_executor.cc b/source/blender/functions/intern/multi_function_procedure_executor.cc
index c6f4212caa6..47643ed22ee 100644
--- a/source/blender/functions/intern/multi_function_procedure_executor.cc
+++ b/source/blender/functions/intern/multi_function_procedure_executor.cc
@@ -682,8 +682,8 @@ class VariableState : NonCopyable, NonMovable {
 
   /**
    * Destruct the masked elements in this variable.
-   * \return True when all elements of this variable are unitialized and the variable state can be
-   *   released.
+   * \return True when all elements of this variable are initialized and the variable state can be
+   *  released.
    */
   bool destruct(IndexMask mask,
                 IndexMask full_mask,
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index c175c211db6..437bd1057c2 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -405,7 +405,7 @@ enum {
 #define _VA_IS_EVENT_MOD4(v, a, b, c) (_VA_IS_EVENT_MOD3(v, a, b) || ((v)->c))
 #define _VA_IS_EVENT_MOD5(v, a, b, c, d) (_VA_IS_EVENT_MOD4(v, a, b, c) || ((v)->d))
 
-/* reusable IS_EVENT_MOD(event, shift, ctrl, alt, oskey), macro */
+/** Reusable `IS_EVENT_MOD(event, shift, ctrl, alt, oskey)` macro. */
 #define IS_EVENT_MOD(...) VA_NARGS_CALL_OVERLOAD(_VA_IS_EVENT_MOD, __VA_ARGS__)
 
 enum eEventType_Mask {



More information about the Bf-blender-cvs mailing list