[Bf-blender-cvs] [3e2017491ae] master: Cleanup: spelling in comments & move doc-strings to headers

Campbell Barton noreply at git.blender.org
Thu May 19 03:18:41 CEST 2022


Commit: 3e2017491ae62ed1b6436484b227ef7542f599aa
Author: Campbell Barton
Date:   Thu May 19 10:02:52 2022 +1000
Branches: master
https://developer.blender.org/rB3e2017491ae62ed1b6436484b227ef7542f599aa

Cleanup: spelling in comments & move doc-strings to headers

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

M	source/blender/draw/engines/eevee_next/eevee_camera.cc
M	source/blender/draw/engines/eevee_next/eevee_material.cc
M	source/blender/draw/engines/eevee_next/eevee_material.hh
M	source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
M	source/blender/draw/engines/eevee_next/eevee_velocity.cc
M	source/blender/editors/mesh/meshtools.cc
M	source/blender/editors/sculpt_paint/sculpt_intern.h
M	source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
M	source/blender/gpu/GPU_storage_buffer.h
M	source/blender/makesdna/intern/makesdna.c

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

diff --git a/source/blender/draw/engines/eevee_next/eevee_camera.cc b/source/blender/draw/engines/eevee_next/eevee_camera.cc
index 11cc6453817..e6d2e2db764 100644
--- a/source/blender/draw/engines/eevee_next/eevee_camera.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_camera.cc
@@ -69,7 +69,7 @@ void Camera::init()
     data.type = DRW_view_is_persp_get(inst_.drw_view) ? CAMERA_PERSP : CAMERA_ORTHO;
   }
   else {
-    /* Lightprobe baking. */
+    /* Light-probe baking. */
     data.type = CAMERA_PERSP;
   }
 }
@@ -91,7 +91,7 @@ void Camera::sync()
     DRW_view_camtexco_get(inst_.drw_view, data.uv_scale);
   }
   else if (inst_.render) {
-    /* TODO(fclem) Overscan */
+    /* TODO(@fclem): Over-scan. */
     // RE_GetCameraWindowWithOverscan(inst_.render->re, g_data->overscan, data.winmat);
     RE_GetCameraWindow(inst_.render->re, camera_eval, data.winmat.ptr());
     RE_GetCameraModelMatrix(inst_.render->re, camera_eval, data.viewinv.ptr());
diff --git a/source/blender/draw/engines/eevee_next/eevee_material.cc b/source/blender/draw/engines/eevee_next/eevee_material.cc
index 33204ed9474..1676c89d679 100644
--- a/source/blender/draw/engines/eevee_next/eevee_material.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_material.cc
@@ -51,7 +51,6 @@ DefaultSurfaceNodeTree::~DefaultSurfaceNodeTree()
   MEM_SAFE_FREE(ntree_);
 }
 
-/* Configure a default nodetree with the given material.  */
 bNodeTree *DefaultSurfaceNodeTree::nodetree_get(::Material *ma)
 {
   /* WARNING: This function is not threadsafe. Which is not a problem for the moment. */
@@ -223,7 +222,7 @@ MaterialPass MaterialModule::material_pass_get(::Material *blender_mat,
       /* IMPORTANT: We always create a subgroup so that all subgroups are inserted after the
        * first "empty" shgroup. This avoids messing the order of subgroups when there is more
        * nested subgroup (i.e: hair drawing). */
-      /* TODO(fclem) Remove material resource binding from the first group creation. */
+      /* TODO(@fclem): Remove material resource binding from the first group creation. */
       matpass.shgrp = DRW_shgroup_create_sub(grp);
       DRW_shgroup_add_material_resources(matpass.shgrp, matpass.gpumat);
     }
@@ -244,13 +243,13 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
                                        (has_motion ? MAT_PIPE_DEFERRED_PREPASS_VELOCITY :
                                                      MAT_PIPE_DEFERRED_PREPASS);
 
-  /* TEST until we have defered pipeline up and running. */
+  /* TEST until we have deferred pipeline up and running. */
   surface_pipe = MAT_PIPE_FORWARD;
   prepass_pipe = has_motion ? MAT_PIPE_FORWARD_PREPASS_VELOCITY : MAT_PIPE_FORWARD_PREPASS;
 
   MaterialKey material_key(blender_mat, geometry_type, surface_pipe);
 
-  /* TODO allocate in blocks to avoid memory fragmentation. */
+  /* TODO: allocate in blocks to avoid memory fragmentation. */
   auto add_cb = [&]() { return new Material(); };
   Material &mat = *material_map_.lookup_or_add_cb(material_key, add_cb);
 
@@ -274,7 +273,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
   return mat;
 }
 
-/* Return correct material or empty default material if slot is empty. */
 ::Material *MaterialModule::material_from_slot(Object *ob, int slot)
 {
   if (ob->base_flag & BASE_HOLDOUT) {
@@ -290,8 +288,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
   return ma;
 }
 
-/* Returned Material references are valid until the next call to this function or
- * material_get(). */
 MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
 {
   material_array_.materials.clear();
@@ -308,8 +304,6 @@ MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
   return material_array_;
 }
 
-/* Returned Material references are valid until the next call to this function or
- * material_array_get(). */
 Material &MaterialModule::material_get(Object *ob,
                                        bool has_motion,
                                        int mat_nr,
@@ -322,4 +316,4 @@ Material &MaterialModule::material_get(Object *ob,
 
 /** \} */
 
-}  // namespace blender::eevee
\ No newline at end of file
+}  // namespace blender::eevee
diff --git a/source/blender/draw/engines/eevee_next/eevee_material.hh b/source/blender/draw/engines/eevee_next/eevee_material.hh
index bdf9b7824c5..23165a741b9 100644
--- a/source/blender/draw/engines/eevee_next/eevee_material.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_material.hh
@@ -191,6 +191,7 @@ class DefaultSurfaceNodeTree {
   DefaultSurfaceNodeTree();
   ~DefaultSurfaceNodeTree();
 
+  /** Configure a default node-tree with the given material. */
   bNodeTree *nodetree_get(::Material *ma);
 };
 
@@ -242,7 +243,14 @@ class MaterialModule {
 
   void begin_sync();
 
+  /**
+   * Returned Material references are valid until the next call to this function or material_get().
+   */
   MaterialArray &material_array_get(Object *ob, bool has_motion);
+  /**
+   * Returned Material references are valid until the next call to this function or
+   * material_array_get().
+   */
   Material &material_get(Object *ob, bool has_motion, int mat_nr, eMaterialGeometry geometry_type);
 
  private:
@@ -250,6 +258,7 @@ class MaterialModule {
                           eMaterialGeometry geometry_type,
                           bool has_motion);
 
+  /** Return correct material or empty default material if slot is empty. */
   ::Material *material_from_slot(Object *ob, int slot);
   MaterialPass material_pass_get(::Material *blender_mat,
                                  eMaterialPipeline pipeline_type,
diff --git a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
index d9fee1b6073..1261c855a82 100644
--- a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
+++ b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh
@@ -53,7 +53,7 @@ struct CameraData {
   float4x4 viewinv;
   float4x4 winmat;
   float4x4 wininv;
-  /** Camera UV scale and bias. Also known as viewcamtexcofac. */
+  /** Camera UV scale and bias. Also known as `viewcamtexcofac`. */
   float2 uv_scale;
   float2 uv_bias;
   /** Panorama parameters. */
diff --git a/source/blender/draw/engines/eevee_next/eevee_velocity.cc b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
index c556ba21fb5..9f8dce43910 100644
--- a/source/blender/draw/engines/eevee_next/eevee_velocity.cc
+++ b/source/blender/draw/engines/eevee_next/eevee_velocity.cc
@@ -74,7 +74,7 @@ void VelocityModule::step_camera_sync()
 
 bool VelocityModule::step_object_sync(Object *ob,
                                       ObjectKey &object_key,
-                                      int /* IDRecalcFlag */ recalc)
+                                      int /*IDRecalcFlag*/ recalc)
 {
   bool has_motion = object_has_velocity(ob) || (recalc & ID_RECALC_TRANSFORM);
   /* NOTE: Fragile. This will only work with 1 frame of lag since we can't record every geometry
@@ -175,7 +175,7 @@ bool VelocityModule::step_object_sync(Object *ob,
 void VelocityModule::step_swap()
 {
   {
-    /* Now that vertex buffers are garanteed to be updated, proceed with
+    /* Now that vertex buffers are guaranteed to be updated, proceed with
      * offset computation and copy into the geometry step buffer. */
     uint dst_ofs = 0;
     for (VelocityGeometryData &geom : geometry_map.values()) {
@@ -184,8 +184,8 @@ void VelocityModule::step_swap()
       geom.ofs = dst_ofs;
       dst_ofs += src_len;
     }
-    /* TODO(fclem): Fail gracefully (disable motion blur + warning print) if tot_len *
-     * sizeof(float4) is greater than max SSBO size. */
+    /* TODO(@fclem): Fail gracefully (disable motion blur + warning print) if
+       `tot_len * sizeof(float4)` is greater than max SSBO size. */
     geometry_steps[step_]->resize(max_ii(16, dst_ofs));
 
     for (VelocityGeometryData &geom : geometry_map.values()) {
diff --git a/source/blender/editors/mesh/meshtools.cc b/source/blender/editors/mesh/meshtools.cc
index b104820733b..fafccf68f03 100644
--- a/source/blender/editors/mesh/meshtools.cc
+++ b/source/blender/editors/mesh/meshtools.cc
@@ -1374,8 +1374,8 @@ bool ED_mesh_pick_vert(
 
   if (use_zbuf) {
     if (dist_px > 0) {
-      /* sample rect to increase chances of selecting, so that when clicking
-       * on an face in the backbuf, we can still select a vert */
+      /* Sample rectangle to increase chances of selecting, so that when clicking
+       * on an face in the back-buffer, we can still select a vert. */
       *r_index = DRW_select_buffer_find_nearest_to_point(
           vc.depsgraph, vc.region, vc.v3d, mval, 1, me->totvert + 1, &dist_px);
     }
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index f9633c91087..5fa115ed629 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -1652,11 +1652,11 @@ void SCULPT_do_paint_brush(struct PaintModeSettings *paint_mode_settings,
                            int totnode) ATTR_NONNULL();
 
 /**
- * @brief Get the image canvas for painting on the given object.
+ * \brief Get the image canvas for painting on the given object.
  *
- * @return #true if an image is found. The #r_image and #r_image_user fields are filled with the
+ * \return #true if an image is found. The #r_image and #r_image_user fields are filled with the
  * image and image user. Returns false when the image isn't found. In the later case the r_image
- * and r_image_user are set to nullptr/NULL.
+ * and r_image_user are set to NULL.
  */
 bool SCULPT_paint_image_canvas_get(struct PaintModeSettings *paint_mode_settings,
                                    struct Object *ob,
diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
index 06738ef6a12..ad3e1b5d7f2 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
@@ -362,8 +362,10 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list