[Bf-blender-cvs] [2c75857f9fc] master: Cleanup: spelling in comments, use doxygen comments

Campbell Barton noreply at git.blender.org
Fri May 6 09:57:51 CEST 2022


Commit: 2c75857f9fc0dc5d524e4a0407e0a68856e5906e
Author: Campbell Barton
Date:   Fri May 6 17:56:59 2022 +1000
Branches: master
https://developer.blender.org/rB2c75857f9fc0dc5d524e4a0407e0a68856e5906e

Cleanup: spelling in comments, use doxygen comments

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

M	intern/ghost/intern/GHOST_TrackpadWin32.cpp
M	source/blender/blenfont/intern/blf_font.c
M	source/blender/blenfont/intern/blf_internal_types.h
M	source/blender/draw/engines/eevee/eevee_lookdev.c
M	source/blender/draw/intern/shaders/common_globals_lib.glsl
M	source/blender/editors/include/UI_interface_icons.h
M	source/blender/editors/interface/interface_style.cc
M	source/blender/editors/space_node/node_intern.hh
M	source/blender/editors/space_node/space_node.cc
M	source/blender/editors/space_text/text_draw.c
M	source/blender/editors/transform/transform_convert_node.c
M	source/blender/gpu/GPU_texture.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/python/generic/blf_py_api.c

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

diff --git a/intern/ghost/intern/GHOST_TrackpadWin32.cpp b/intern/ghost/intern/GHOST_TrackpadWin32.cpp
index 69b590ee8de..d5317f0f780 100644
--- a/intern/ghost/intern/GHOST_TrackpadWin32.cpp
+++ b/intern/ghost/intern/GHOST_TrackpadWin32.cpp
@@ -308,7 +308,7 @@ HRESULT GHOST_DirectManipulationViewportEventHandler::OnContentUpdated(
   }
 
   /* This state machine is used here because:
-   *  1. Pinch and pan gestures must be differentiated and cannot be proccessed at the same time
+   *  1. Pinch and pan gestures must be differentiated and cannot be processed at the same time
    *     because XY transform values become nonsensical during pinch gesture.
    *  2. GHOST requires delta values for events while DM provides transformation matrix of the
    *     current gesture.
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index f93cb8b2d64..a170f27d247 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -1374,7 +1374,7 @@ bool blf_font_size(FontBLF *font, float size, unsigned int dpi)
       font->dpi = dpi;
     }
     else {
-      printf("The current font does not support the size, %f and dpi, %u\n", size, dpi);
+      printf("The current font does not support the size, %f and DPI, %u\n", size, dpi);
       return false;
     }
   }
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index 62bce36dda0..9dfcb1a4ad6 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -123,7 +123,7 @@ typedef struct GlyphCacheBLF {
   /* font size. */
   float size;
 
-  /* and dpi. */
+  /* and DPI. */
   unsigned int dpi;
 
   bool bold;
@@ -264,7 +264,7 @@ typedef struct FontBLF {
   /* the width to wrap the text, see BLF_WORD_WRAP */
   int wrap_width;
 
-  /* font dpi (default 72). */
+  /* Font DPI (default 72). */
   unsigned int dpi;
 
   /* font size. */
@@ -276,7 +276,8 @@ typedef struct FontBLF {
   /* font options. */
   int flags;
 
-  /* List of glyph caches (GlyphCacheBLF) for this font for size, dpi, bold, italic.
+  /**
+   * List of glyph caches (#GlyphCacheBLF) for this font for size, DPI, bold, italic.
    * Use blf_glyph_cache_acquire(font) and blf_glyph_cache_release(font) to access cache!
    */
   ListBase cache;
diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c
index e6c33feeeb9..79b84bfba4c 100644
--- a/source/blender/draw/engines/eevee/eevee_lookdev.c
+++ b/source/blender/draw/engines/eevee/eevee_lookdev.c
@@ -112,7 +112,7 @@ void EEVEE_lookdev_init(EEVEE_Data *vedata)
 
     if (sphere_size != effects->sphere_size || rect->xmax != effects->anchor[0] ||
         rect->ymin != effects->anchor[1]) {
-      /* Make sphere resolution adaptive to viewport_scale, dpi and lookdev_sphere_size */
+      /* Make sphere resolution adaptive to viewport_scale, DPI and #U.lookdev_sphere_size. */
       float res_scale = clamp_f(
           (U.lookdev_sphere_size / 400.0f) * viewport_scale * U.dpi_fac, 0.1f, 1.0f);
 
diff --git a/source/blender/draw/intern/shaders/common_globals_lib.glsl b/source/blender/draw/intern/shaders/common_globals_lib.glsl
index 0460ba56e4c..a8931292064 100644
--- a/source/blender/draw/intern/shaders/common_globals_lib.glsl
+++ b/source/blender/draw/intern/shaders/common_globals_lib.glsl
@@ -110,7 +110,7 @@ layout(std140) uniform globalsBlock
   vec4 screenVecs[2];
   vec4 sizeViewport; /* Inverted size in zw. */
 
-  float sizePixel; /* This one is for dpi scaling */
+  float sizePixel; /* This one is for DPI scaling. */
   float pixelFac;  /* To use with mul_project_m4_v3_zfac() */
   float sizeObjectCenter;
   float sizeLightCenter;
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index 6416421f4f5..a1a98a4b08c 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -92,7 +92,7 @@ void UI_icon_render_id_ex(const struct bContext *C,
 int UI_icon_preview_to_render_size(enum eIconSizes size);
 
 /**
- * Draws icon with dpi scale factor.
+ * Draws icon with DPI scale factor.
  */
 void UI_icon_draw(float x, float y, int icon_id);
 void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha);
diff --git a/source/blender/editors/interface/interface_style.cc b/source/blender/editors/interface/interface_style.cc
index 0156a943015..291ede05730 100644
--- a/source/blender/editors/interface/interface_style.cc
+++ b/source/blender/editors/interface/interface_style.cc
@@ -376,7 +376,7 @@ void uiStyleInit(void)
 {
   const uiStyle *style = static_cast<uiStyle *>(U.uistyles.first);
 
-  /* recover from uninitialized dpi */
+  /* Recover from uninitialized DPI. */
   if (U.dpi == 0) {
     U.dpi = 72;
   }
diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh
index 4157176cd68..f1653e3dfd6 100644
--- a/source/blender/editors/space_node/node_intern.hh
+++ b/source/blender/editors/space_node/node_intern.hh
@@ -74,13 +74,17 @@ struct SpaceNode_Runtime {
   /** Mouse position for drawing socket-less links and adding nodes. */
   float2 cursor;
 
-  /* Indicates that the compositing tree in the space needs to be re-evaluated using the
+  /**
+   * Indicates that the compositing tree in the space needs to be re-evaluated using the
    * auto-compositing pipeline.
-   * Takes priority over the regular compsiting. */
+   * Takes priority over the regular compositing.
+   */
   bool recalc_auto_compositing;
 
-  /* Indicates that the compositing int the space  tree needs to be re-evaluated using
-   * regular compositing pipeline. */
+  /**
+   * Indicates that the compositing int the space  tree needs to be re-evaluated using
+   * regular compositing pipeline.
+   */
   bool recalc_regular_compositing;
 
   /** Temporary data for modal linking operator. */
@@ -100,7 +104,7 @@ enum NodeResizeDirection {
 };
 ENUM_OPERATORS(NodeResizeDirection, NODE_RESIZE_LEFT);
 
-/* Nodes draw without dpi - the view zoom is flexible. */
+/* Nodes draw without DPI - the view zoom is flexible. */
 #define HIDDEN_RAD (0.75f * U.widget_unit)
 #define BASIS_RAD (0.2f * U.widget_unit)
 #define NODE_DYS (U.widget_unit / 2)
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc
index 296cd1ff133..348fb926d17 100644
--- a/source/blender/editors/space_node/space_node.cc
+++ b/source/blender/editors/space_node/space_node.cc
@@ -327,8 +327,9 @@ static bool any_node_uses_id(const bNodeTree *ntree, const ID *id)
 /**
  * Tag the space to recalculate the compositing tree using auto-compositing pipeline.
  *
- * Will check the space to be using a compsiting tree, and check whether auto-compositing
- * is enabled. If the checks do not pass then the function has no affect. */
+ * Will check the space to be using a compositing tree, and check whether auto-compositing
+ * is enabled. If the checks do not pass then the function has no affect.
+ */
 static void node_area_tag_recalc_auto_compositing(SpaceNode *snode, ScrArea *area)
 {
   if (!ED_node_is_compositor(snode)) {
@@ -347,7 +348,8 @@ static void node_area_tag_recalc_auto_compositing(SpaceNode *snode, ScrArea *are
  * For all node trees this will do `snode_set_context()` which takes care of setting an active
  * tree. This will be done in the area refresh callback.
  *
- * For compositor tree this will additionally start of the compositor job. */
+ * For compositor tree this will additionally start of the compositor job.
+ */
 static void node_area_tag_tree_recalc(SpaceNode *snode, ScrArea *area)
 {
   if (ED_node_is_compositor(snode)) {
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 36eafedbc80..c93ffccd477 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1603,7 +1603,7 @@ void draw_text_main(SpaceText *st, ARegion *region)
     return;
   }
 
-  /* dpi controlled line height and font size */
+  /* DPI controlled line height and font size. */
   st->runtime.lheight_px = (U.widget_unit * st->lheight) / 20;
 
   /* don't draw lines below this */
diff --git a/source/blender/editors/transform/transform_convert_node.c b/source/blender/editors/transform/transform_convert_node.c
index d5d79bedbf4..8281052c314 100644
--- a/source/blender/editors/transform/transform_convert_node.c
+++ b/source/blender/editors/transform/transform_convert_node.c
@@ -46,7 +46,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node, const
   }
 
   /* use top-left corner as the transform origin for nodes */
-  /* weirdo - but the node system is a mix of free 2d elements and dpi sensitive UI */
+  /* Weirdo - but the node system is a mix of free 2d elements and DPI sensitive UI. */
 #ifdef USE_NODE_CENTER
   td2d->loc[0] = (locx * dpi_fac) + (BLI_rctf_size_x(&node->totr) * +0.5f);
   td2d->loc[1] = (locy * dpi_fac) + (BLI_rctf_size_y(&node->totr) * -0.5f);
@@ -194,7 +194,7 @@ void flushTransNodes(TransInfo *t)
       loc[1] += 0.5f * BLI_rctf_size_y(&node->totr);
 #endif
 
-      /* weirdo - but the node system is a mix of free 2d elements and dpi sensitive UI */
+      /* Weirdo - but the node system is a mix of free 2d elements and DPI sensitive UI. */
       loc[0] /= dpi_fac;
       loc[1] /= dpi_fac;
 
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index bb0912f284b..474205ce8c3 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -280,9 +280,9 @@ void *GPU_texture_read(GPUTexture *tex, eGPUDataFormat data_format, int miplvl);
 /**
  * Fills the whole texture with the same data for all pixels.
  * \warning Only work for 2D texture for now.
- * \warning Only clears the mip 0 of the texture.
+ * \warning Only clears the MIP 0 of the texture.
  * \param data_format: data format of the pixel data.
- * \note The format is float for unorm textures.
+ * \note The format is fl

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list