[Bf-blender-cvs] [0d2589d08c6] master: Cleanup: spelling

Campbell Barton noreply at git.blender.org
Wed Aug 4 02:36:14 CEST 2021


Commit: 0d2589d08c615d1bc07e5156b41b9ffda6c3ba27
Author: Campbell Barton
Date:   Wed Aug 4 10:03:07 2021 +1000
Branches: master
https://developer.blender.org/rB0d2589d08c615d1bc07e5156b41b9ffda6c3ba27

Cleanup: spelling

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

M	source/blender/blenlib/BLI_array.h
M	source/blender/blenlib/intern/polyfill_2d_beautify.c
M	source/blender/bmesh/tools/bmesh_decimate_collapse.c
M	source/blender/compositor/operations/COM_GlareBaseOperation.h
M	source/blender/editors/animation/time_scrub_ui.c
M	source/blender/editors/mask/mask_select.c
M	source/blender/editors/uvedit/uvedit_smart_stitch.c
M	source/blender/io/usd/intern/usd_capi_import.cc
M	source/blender/io/usd/intern/usd_reader_material.h
M	source/blender/io/usd/intern/usd_reader_mesh.cc

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

diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 6bf29a6168f..084f573e8c7 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -156,7 +156,7 @@ void _bli_array_grow_func(void **arr_p,
  * \{ */
 
 /**
- * not part of the 'API' but handy funcs,
+ * Not part of the 'API' but handy functions,
  * same purpose as #BLI_array_staticdeclare()
  * but use when the max size is known ahead of time */
 #define BLI_array_fixedstack_declare(arr, maxstatic, realsize, allocstr) \
diff --git a/source/blender/blenlib/intern/polyfill_2d_beautify.c b/source/blender/blenlib/intern/polyfill_2d_beautify.c
index 7781e3a0f6f..ed07b002e32 100644
--- a/source/blender/blenlib/intern/polyfill_2d_beautify.c
+++ b/source/blender/blenlib/intern/polyfill_2d_beautify.c
@@ -25,7 +25,7 @@
  * on a simple polygon representation where we _know_:
  *
  * - The polygon is primitive with no holes with a continuous boundary.
- * - Tris have consistent winding.
+ * - Triangles have consistent winding.
  * - 2d (saves some hassles projecting face pairs on an axis for every edge-rotation)
  *   also saves us having to store all previous edge-states (see #EdRotState in bmesh_beautify.c)
  *
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 20b6903b239..97fccbe01fd 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -935,9 +935,9 @@ static bool bm_edge_collapse_is_degenerate_topology(BMEdge *e_first)
 }
 
 /**
- * special, highly limited edge collapse function
+ * Special, highly limited edge collapse function
  * intended for speed over flexibility.
- * can only collapse edges connected to (1, 2) tris.
+ * can only collapse edges connected to (1, 2) triangles.
  *
  * Important - don't add vert/edge/face data on collapsing!
  *
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.h b/source/blender/compositor/operations/COM_GlareBaseOperation.h
index 50db4e02940..6dac6f5ecc7 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.h
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.h
@@ -23,8 +23,8 @@
 
 namespace blender::compositor {
 
-/* utility functions used by glare, tonemap and lens distortion */
-/* soms macros for color handling */
+/* Utility functions used by glare, tone-map and lens distortion. */
+/* Some macros for color handling. */
 typedef float fRGB[4];
 
 /* TODO: replace with BLI_math_vector. */
diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c
index 182e61e53b6..8aeb6a57124 100644
--- a/source/blender/editors/animation/time_scrub_ui.c
+++ b/source/blender/editors/animation/time_scrub_ui.c
@@ -244,8 +244,8 @@ void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDope
   UI_block_align_end(block);
   UI_block_layout_resolve(block, NULL, NULL);
 
-  /* Make sure the events are consumed from the search and dont reach other UI blocks since this is
-   * drawn on top of animchannels. */
+  /* Make sure the events are consumed from the search and don't reach other UI blocks since this
+   * is drawn on top of animation-channels. */
   UI_block_flag_enable(block, UI_BLOCK_CLIP_EVENTS);
   UI_block_bounds_set_normal(block, 0);
   UI_block_end(C, block);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 3bb05a27c54..8ddc3758e4e 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -164,8 +164,8 @@ void ED_mask_select_flush_all(Mask *mask)
     LISTBASE_FOREACH (MaskSpline *, spline, &mask_layer->splines) {
       spline->flag &= ~SELECT;
 
-      /* intentionally _dont_ do this in the mask layer loop
-       * so we clear flags on all splines */
+      /* Intentionally *don't* do this in the mask layer loop
+       * so we clear flags on all splines. */
       if (mask_layer->restrictflag & MASK_RESTRICT_VIEW) {
         continue;
       }
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c
index 535a0e00347..1bcd1fad9d6 100644
--- a/source/blender/editors/uvedit/uvedit_smart_stitch.c
+++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c
@@ -1769,7 +1769,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(region), void
 
     GPU_blend(GPU_BLEND_ALPHA);
 
-    /* Static Tris */
+    /* Static Triangles. */
     if (stitch_preview->static_tris) {
       UI_GetThemeColor4fv(TH_STITCH_PREVIEW_ACTIVE, col);
       vbo = GPU_vertbuf_create_with_format(&format);
diff --git a/source/blender/io/usd/intern/usd_capi_import.cc b/source/blender/io/usd/intern/usd_capi_import.cc
index 8255fca284c..789ff20ba82 100644
--- a/source/blender/io/usd/intern/usd_capi_import.cc
+++ b/source/blender/io/usd/intern/usd_capi_import.cc
@@ -365,8 +365,7 @@ bool USD_import(struct bContext *C,
 {
   blender::io::usd::ensure_usd_plugin_path_registered();
 
-  /* Using new here since MEM_* funcs do not call ctor to properly initialize
-   * data. */
+  /* Using new here since `MEM_*` functions do not call constructor to properly initialize data. */
   ImportJobData *job = new ImportJobData();
   job->bmain = CTX_data_main(C);
   job->scene = CTX_data_scene(C);
@@ -496,7 +495,7 @@ CacheReader *CacheReader_open_usd_object(CacheArchiveHandle *handle,
   USDPrimReader *usd_reader = archive->create_reader(prim);
 
   if (usd_reader == nullptr) {
-    /* This object is not supported */
+    /* This object is not supported. */
     return nullptr;
   }
   usd_reader->object(object);
diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h
index 3e8fc675931..a17504bd590 100644
--- a/source/blender/io/usd/intern/usd_reader_material.h
+++ b/source/blender/io/usd/intern/usd_reader_material.h
@@ -55,28 +55,29 @@ struct NodePlacementContext {
 
 /* Converts USD materials to Blender representation. */
 
-/* By default, the USDMaterialReader creates a Blender material with
+/**
+   By default, the #USDMaterialReader creates a Blender material with
  * the same name as the USD material.  If the USD material has a
- * UsdPreviewSurface source, the Blender material's viewport display
+ * #UsdPreviewSurface source, the Blender material's viewport display
  * color, roughness and metallic properties are set to the corresponding
- * UsdPreoviewSurface inputs.
+ * #UsdPreoviewSurface inputs.
  *
  * If the Import USD Preview option is enabled, the current implementation
- * converts UsdPreviewSurface to Blender nodes as follows:
+ * converts #UsdPreviewSurface to Blender nodes as follows:
  *
- * UsdPreviewSurface -> Pricipled BSDF
- * UsdUVTexture -> Texture Image + Normal Map
- * UsdPrimvarReader_float2 -> UV Map
+ * - #UsdPreviewSurface -> Principled BSDF
+ * - #UsdUVTexture -> Texture Image + Normal Map
+ * - UsdPrimvarReader_float2 -> UV Map
  *
  * Limitations: arbitrary primvar readers or UsdTransform2d not yet
- * supported. For UsdUVTexture, only the file, st and sourceColorSpace
+ * supported. For #UsdUVTexture, only the file, st and #sourceColorSpace
  * inputs are handled.
  *
  * TODO(makowalski):  Investigate adding support for converting additional
  * shaders and inputs.  Supporting certain types of inputs, such as texture
  * scale and bias, will probably require creating Blender Group nodes with
- * the corresponding inputs. */
-
+ * the corresponding inputs.
+ */
 class USDMaterialReader {
  protected:
   USDImportParams params_;
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc
index f13da4680e2..9c75bc8afae 100644
--- a/source/blender/io/usd/intern/usd_reader_mesh.cc
+++ b/source/blender/io/usd/intern/usd_reader_mesh.cc
@@ -61,7 +61,7 @@ static const pxr::TfToken normalsPrimvar("normals", pxr::TfToken::Immortal);
 }  // namespace usdtokens
 
 namespace utils {
-/* Very similar to abc mesh utils. */
+/* Very similar to #blender::io::alembic::utils. */
 static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *r_mat_map)
 {
   if (r_mat_map == nullptr) {
@@ -71,7 +71,7 @@ static void build_mat_map(const Main *bmain, std::map<std::string, Material *> *
   Material *material = static_cast<Material *>(bmain->materials.first);
 
   for (; material; material = static_cast<Material *>(material->id.next)) {
-    /* We have to do this because the stored material name is coming directly from usd. */
+    /* We have to do this because the stored material name is coming directly from USD. */
     (*r_mat_map)[pxr::TfMakeValidIdentifier(material->id.name + 2)] = material;
   }
 }
@@ -212,7 +212,7 @@ void USDMeshReader::read_object_data(Main *bmain, const double motionSampleTime)
 
   is_initial_load_ = false;
   if (read_mesh != mesh) {
-    /* XXX fixme after 2.80; mesh->flag isn't copied by BKE_mesh_nomain_to_mesh() */
+    /* FIXME: after 2.80; `mesh->flag` isn't copied by #BKE_mesh_nomain_to_mesh() */
     /* read_mesh can be freed by BKE_mesh_nomain_to_mesh(), so get the flag before that happens. */
     short autosmooth = (read_mesh->flag & ME_AUTOSMOOTH);
     BKE_mesh_nomain_to_mesh(read_mesh, mesh, object_, &CD_MASK_MESH, true);
@@ -334,7 +334,7 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
 
       pxr::TfToken uv_token;
 
-      /* If first time seeing uv token, store in map of <layer->uid, TfToken> */
+      /* If first time seeing uv token, store in map of `<layer->uid, TfToken>`. */
       if (uv_token_map_.find(layer_name) == uv_token_map_.end()) {
         uv_token = pxr::TfToken(layer_name);
         uv_token_map_.insert(std::make_pair(layer_name, uv_token));
@@ -347,7 +347,7 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo
       if (uv_token.IsEmpty()) {
         continue;
       }
-      /* Early out if not first load and uvs arent animated. */
+      /* Early out if not first load and UVs aren't animated. */
       if (!load_uvs && p

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list