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

Campbell Barton noreply at git.blender.org
Fri Oct 7 01:45:07 CEST 2022


Commit: ecc404ea1a37a682c0b75ec10fcece9325a15e9d
Author: Campbell Barton
Date:   Fri Oct 7 10:32:02 2022 +1100
Branches: master
https://developer.blender.org/rBecc404ea1a37a682c0b75ec10fcece9325a15e9d

Cleanup: spelling in comments

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

M	intern/cycles/kernel/integrator/init_from_bake.h
M	source/blender/blenkernel/intern/cdderivedmesh.c
M	source/blender/blenkernel/intern/layer.c
M	source/blender/blenkernel/intern/lib_override.cc
M	source/blender/blenkernel/intern/multires.cc
M	source/blender/blenkernel/intern/shrinkwrap.cc
M	source/blender/blenkernel/intern/subdiv_ccg.cc
M	source/blender/bmesh/intern/bmesh_query.h
M	source/blender/draw/intern/draw_pbvh.cc
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/modifiers/intern/MOD_multires.cc
M	source/blender/sequencer/SEQ_time.h

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

diff --git a/intern/cycles/kernel/integrator/init_from_bake.h b/intern/cycles/kernel/integrator/init_from_bake.h
index 15968670ac2..667ba949760 100644
--- a/intern/cycles/kernel/integrator/init_from_bake.h
+++ b/intern/cycles/kernel/integrator/init_from_bake.h
@@ -239,7 +239,7 @@ ccl_device bool integrator_init_from_bake(KernelGlobals kg,
       }
 
       /* We don't want to bake the back face, so make sure the ray direction never
-       * goes behind the geometry (flat) normal. This is a failsafe, and should rarely happen. */
+       * goes behind the geometry (flat) normal. This is a fail-safe, and should rarely happen. */
       const float true_normal_epsilon = 0.00001f;
 
       if (dot(D, Ng) <= true_normal_epsilon) {
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 1f97f8a848c..41993764c0c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -198,7 +198,7 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh,
           DM_TYPE_CDDM,
           mesh->totvert,
           mesh->totedge,
-          0 /* mesh->totface */,
+          0 /* `mesh->totface` */,
           mesh->totloop,
           mesh->totpoly);
 
@@ -213,7 +213,7 @@ static DerivedMesh *cdDM_from_mesh_ex(Mesh *mesh,
                    &dm->faceData,
                    cddata_masks.fmask | CD_MASK_ORIGINDEX,
                    alloctype,
-                   0 /* mesh->totface */);
+                   0 /* `mesh->totface` */);
   CustomData_merge(&mesh->ldata, &dm->loopData, cddata_masks.lmask, alloctype, mesh->totloop);
   CustomData_merge(&mesh->pdata, &dm->polyData, cddata_masks.pmask, alloctype, mesh->totpoly);
 
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index fe11dc99bac..fcb0adfde34 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -988,7 +988,7 @@ void BKE_main_view_layers_synced_ensure(const Main *bmain)
     BKE_scene_view_layers_synced_ensure(scene);
   }
 
-  /* NOTE: This is not (yet?) covered by the dirty tag and deffered resync system */
+  /* NOTE: This is not (yet?) covered by the dirty tag and differed re-sync system */
   BKE_layer_collection_local_sync_all(bmain);
 }
 
diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc
index 04679b72b2d..07eb4741b1f 100644
--- a/source/blender/blenkernel/intern/lib_override.cc
+++ b/source/blender/blenkernel/intern/lib_override.cc
@@ -1389,7 +1389,7 @@ bool BKE_lib_override_library_create(Main *bmain,
     id_hierarchy_root_reference = id_root_reference;
   }
 
-  /* While in theory it _should_ be enough to ensure sync of given viewlayer (if any), or at least
+  /* While in theory it _should_ be enough to ensure sync of given view-layer (if any), or at least
    * of given scene, think for now it's better to get a fully synced Main at this point, this code
    * may do some very wide remapping/data access in some cases. */
   BKE_main_view_layers_synced_ensure(bmain);
diff --git a/source/blender/blenkernel/intern/multires.cc b/source/blender/blenkernel/intern/multires.cc
index 83189adfcdb..61cfe043927 100644
--- a/source/blender/blenkernel/intern/multires.cc
+++ b/source/blender/blenkernel/intern/multires.cc
@@ -69,8 +69,8 @@ void multires_customdata_delete(Mesh *me)
   if (me->edit_mesh) {
     BMEditMesh *em = me->edit_mesh;
     /* CustomData_external_remove is used here only to mark layer
-     * as non-external for further free-ing, so zero element count
-     * looks safer than em->totface */
+     * as non-external for further freeing, so zero element count
+     * looks safer than `em->bm->totface`. */
     CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
 
     if (CustomData_has_layer(&em->bm->ldata, CD_MDISPS)) {
@@ -1359,11 +1359,9 @@ static void multires_sync_levels(Scene *scene, Object *ob_src, Object *ob_dst)
   MultiresModifierData *mmd_dst = get_multires_modifier(scene, ob_dst, true);
 
   if (!mmd_src) {
-    /* object could have MDISP even when there is no multires modifier
-     * this could lead to troubles due to i've got no idea how mdisp could be
-     * up-sampled correct without modifier data.
-     * just remove mdisps if no multires present (nazgul) */
-
+    /* NOTE(@sergey): object could have MDISP even when there is no multires modifier
+     * this could lead to troubles due to I've got no idea how mdisp could be
+     * up-sampled correct without modifier data. Just remove mdisps if no multires present. */
     multires_customdata_delete(static_cast<Mesh *>(ob_src->data));
   }
 
@@ -1404,9 +1402,8 @@ static void multires_apply_smat(struct Depsgraph * /*depsgraph*/,
     multires_apply_uniform_scale(object, scale);
   }
   else {
-    /* TODO(sergey): This branch of code actually requires more work to
-     * preserve all the details.
-     */
+    /* TODO(@sergey): This branch of code actually requires more work to
+     * preserve all the details. */
     const float scale = mat3_to_scale(smat);
     multires_apply_uniform_scale(object, scale);
   }
diff --git a/source/blender/blenkernel/intern/shrinkwrap.cc b/source/blender/blenkernel/intern/shrinkwrap.cc
index 2b8af00d281..91683788422 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.cc
+++ b/source/blender/blenkernel/intern/shrinkwrap.cc
@@ -61,7 +61,8 @@ struct ShrinkwrapCalcData {
 
   MVert *vert; /* Array of verts being projected. */
   const float (*vert_normals)[3];
-  float (*vertexCos)[3]; /* vertexs being shrinkwraped */
+  /* Vertices being shrink-wrapped. */
+  float (*vertexCos)[3];
   int numVerts;
 
   const MDeformVert *dvert; /* Pointer to mdeform array */
@@ -332,8 +333,8 @@ void BKE_shrinkwrap_compute_boundary_data(Mesh *mesh)
 /**
  * Shrink-wrap to the nearest vertex
  *
- * it builds a #BVHTree of vertices we can attach to and then
- * for each vertex performs a nearest vertex search on the tree
+ * it builds a BVH-tree of vertices we can attach to and then
+ * for each vertex performs a nearest vertex search on the tree.
  */
 static void shrinkwrap_calc_nearest_vertex_cb_ex(void *__restrict userdata,
                                                  const int i,
@@ -535,12 +536,12 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata,
 
   hit->index = -1;
 
-  /* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */
+  /* TODO: we should use FLT_MAX here, but sweep-sphere code isn't prepared for that. */
   hit->dist = BVH_RAYCAST_DIST_MAX;
 
   bool is_aux = false;
 
-  /* Project over positive direction of axis */
+  /* Project over positive direction of axis. */
   if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) {
     if (aux_tree) {
       if (BKE_shrinkwrap_project_normal(0, tmp_co, tmp_no, 0.0, local2aux, aux_tree, hit)) {
@@ -1091,10 +1092,10 @@ void BKE_shrinkwrap_find_nearest_surface(ShrinkwrapTreeData *tree,
   }
 }
 
-/*
- * Shrinkwrap moving vertexs to the nearest surface point on the target
+/**
+ * Shrink-wrap moving vertices to the nearest surface point on the target.
  *
- * it builds a BVHTree from the target mesh and then performs a
+ * It builds a #BVHTree from the target mesh and then performs a
  * NN matches for each vertex
  */
 static void shrinkwrap_calc_nearest_surface_point_cb_ex(void *__restrict userdata,
@@ -1408,11 +1409,11 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd,
   calc.aux_target = DEG_get_evaluated_object(ctx->depsgraph, smd->auxTarget);
 
   if (mesh != nullptr && smd->shrinkType == MOD_SHRINKWRAP_PROJECT) {
-    /* Setup arrays to get vertexs positions, normals and deform weights */
+    /* Setup arrays to get vertices position, normals and deform weights. */
     calc.vert = BKE_mesh_verts_for_write(mesh);
     calc.vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
 
-    /* Using vertexs positions/normals as if a subsurface was applied */
+    /* Using vertices positions/normals as if a subsurface was applied */
     if (smd->subsurfLevels) {
       SubsurfModifierData ssmd = {{nullptr}};
       ssmd.subdivType = ME_CC_SUBSURF;  /* catmull clark */
diff --git a/source/blender/blenkernel/intern/subdiv_ccg.cc b/source/blender/blenkernel/intern/subdiv_ccg.cc
index 8c44d53e5bd..704e0690892 100644
--- a/source/blender/blenkernel/intern/subdiv_ccg.cc
+++ b/source/blender/blenkernel/intern/subdiv_ccg.cc
@@ -363,7 +363,7 @@ static int *static_or_heap_storage_get(StaticOrHeapIntStorage *storage, int heap
   if (heap_len <= storage->static_storage_len) {
     return storage->static_storage;
   }
-  /* Make sure heap ius big enough. */
+  /* Make sure heap is big enough. */
   if (heap_len > storage->heap_storage_len) {
     MEM_SAFE_FREE(storage->heap_storage);
     storage->heap_storage = static_cast<int *>(
@@ -1708,7 +1708,7 @@ static int adjacent_edge_point_index_from_coord(const SubdivCCG *subdiv_ccg,
     directional_edge_vertex_index = edge_vertices_indices[1];
   }
 
-  /* Flip the index if the edde points opposite direction. */
+  /* Flip the index if the edge points opposite direction. */
   if (adjacent_vertex_index != directional_edge_vertex_index) {
     const int num_edge_points = subdiv_ccg->grid_size * 2;
     adjacent_edge_point_index = num_edge_points - adjacent_edge_point_index - 1;
diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h
index 9d690395d72..c3a30df11d6 100644
--- a/source/blender/bmesh/intern/bmesh_query.h
+++ b/source/blender/bmesh/intern/bmesh_query.h
@@ -708,7 +708,7 @@ double BM_mesh_calc_volume(BMesh *bm, bool is_signed) ATTR_WARN_UNUSED_RESULT AT
  * Calculate isolated groups of faces with optional filtering.
  *
  * \param bm: the BMesh.
- * \param r_groups_array: Array of ints to fill in, length of bm->totface
+ * \param r_groups_array: Array of integers to fill in, length of `bm->totface`
  *        (or when hflag_test is set, the number of flagged faces).
  * \param r_group_index: index, length pairs into \a r_groups_array, size of return value
  *        int pairs: (array_sta

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list