[Bf-blender-cvs] [6c6a53fad35] master: Cleanup: spelling in comments, formatting, move comments into headers

Campbell Barton noreply at git.blender.org
Tue Sep 6 08:30:32 CEST 2022


Commit: 6c6a53fad357ad63d8128c33da7a84f172ef0b63
Author: Campbell Barton
Date:   Tue Sep 6 16:25:20 2022 +1000
Branches: master
https://developer.blender.org/rB6c6a53fad357ad63d8128c33da7a84f172ef0b63

Cleanup: spelling in comments, formatting, move comments into headers

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

M	intern/cycles/blender/sync.cpp
M	intern/cycles/device/optix/device_impl.cpp
M	intern/cycles/kernel/bvh/bvh.h
M	intern/cycles/kernel/device/oneapi/kernel_templates.h
M	intern/cycles/kernel/types.h
M	intern/ghost/GHOST_C-api.h
M	intern/ghost/intern/GHOST_SystemWin32.cpp
M	source/blender/blenfont/intern/blf_font.c
M	source/blender/blenkernel/intern/anim_sys.c
M	source/blender/blenkernel/intern/curves.cc
M	source/blender/blenkernel/intern/gpencil_modifier.c
M	source/blender/blenkernel/intern/main_namemap.cc
M	source/blender/blenkernel/intern/subsurf_ccg.c
M	source/blender/blenkernel/nla_private.h
M	source/blender/blenlib/intern/BLI_kdopbvh.c
M	source/blender/blenloader/BLO_readfile.h
M	source/blender/compositor/realtime_compositor/COM_compile_state.hh
M	source/blender/compositor/realtime_compositor/COM_shader_operation.hh
M	source/blender/compositor/realtime_compositor/COM_simple_operation.hh
M	source/blender/compositor/realtime_compositor/COM_utilities.hh
M	source/blender/compositor/realtime_compositor/intern/operation.cc
M	source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc
M	source/blender/draw/engines/eevee/eevee_cryptomatte.c
M	source/blender/draw/engines/eevee/shaders/closure_type_lib.glsl
M	source/blender/draw/engines/eevee_next/eevee_defines.hh
M	source/blender/draw/engines/eevee_next/eevee_film.cc
M	source/blender/draw/engines/eevee_next/eevee_sync.cc
M	source/blender/draw/engines/eevee_next/eevee_world.cc
M	source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_resolve_comp.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_depth_of_field_stabilize_comp.glsl
M	source/blender/draw/engines/eevee_next/shaders/eevee_motion_blur_dilate_comp.glsl
M	source/blender/draw/intern/draw_command.cc
M	source/blender/draw/intern/draw_command_shared.hh
M	source/blender/draw/intern/draw_curves.cc
M	source/blender/draw/intern/draw_hair.cc
M	source/blender/draw/intern/draw_manager.c
M	source/blender/draw/intern/draw_manager.cc
M	source/blender/draw/intern/draw_manager.hh
M	source/blender/draw/intern/draw_pass.hh
M	source/blender/draw/intern/draw_shader_shared.h
M	source/blender/draw/intern/draw_view.hh
M	source/blender/draw/intern/shaders/draw_command_generate_comp.glsl
M	source/blender/editors/animation/keyframes_edit.c
M	source/blender/editors/animation/keyingsets.c
M	source/blender/editors/curve/editcurve.c
M	source/blender/editors/curves/intern/curves_ops.cc
M	source/blender/editors/interface/view2d.cc
M	source/blender/editors/sculpt_paint/paint_image.cc
M	source/blender/editors/sculpt_paint/paint_vertex.cc
M	source/blender/editors/sculpt_paint/sculpt.c
M	source/blender/editors/sculpt_paint/sculpt_undo.c
M	source/blender/editors/space_node/node_add.cc
M	source/blender/editors/space_node/node_relationships.cc
M	source/blender/editors/space_outliner/outliner_edit.cc
M	source/blender/editors/space_outliner/outliner_tools.cc
M	source/blender/editors/space_sequencer/sequencer_drag_drop.c
M	source/blender/editors/space_sequencer/sequencer_edit.c
M	source/blender/editors/transform/transform_convert_armature.c
M	source/blender/editors/transform/transform_mode.c
M	source/blender/editors/transform/transform_snap_object.cc
M	source/blender/geometry/intern/uv_parametrizer.cc
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/blender/gpencil_modifiers/intern/lineart/lineart_shadow.c
M	source/blender/gpu/GPU_index_buffer.h
M	source/blender/gpu/GPU_shader_shared_utils.h
M	source/blender/gpu/intern/gpu_codegen.cc
M	source/blender/gpu/intern/gpu_index_buffer.cc
M	source/blender/gpu/intern/gpu_shader_create_info.hh
M	source/blender/gpu/metal/mtl_capabilities.hh
M	source/blender/gpu/metal/mtl_command_buffer.mm
M	source/blender/gpu/metal/mtl_context.hh
M	source/blender/gpu/metal/mtl_context.mm
M	source/blender/gpu/metal/mtl_framebuffer.hh
M	source/blender/gpu/metal/mtl_framebuffer.mm
M	source/blender/gpu/metal/mtl_index_buffer.hh
M	source/blender/gpu/metal/mtl_index_buffer.mm
M	source/blender/gpu/metal/mtl_memory.hh
M	source/blender/gpu/metal/mtl_pso_descriptor_state.hh
M	source/blender/gpu/metal/mtl_shader.hh
M	source/blender/gpu/metal/mtl_shader.mm
M	source/blender/gpu/metal/mtl_shader_generator.hh
M	source/blender/gpu/metal/mtl_shader_generator.mm
M	source/blender/gpu/metal/mtl_shader_interface.hh
M	source/blender/gpu/metal/mtl_shader_interface.mm
M	source/blender/gpu/metal/mtl_shader_interface_type.hh
M	source/blender/gpu/metal/mtl_state.mm
M	source/blender/gpu/metal/mtl_texture_util.mm
M	source/blender/gpu/shaders/compositor/compositor_morphological_distance_feather.glsl
M	source/blender/gpu/shaders/compositor/compositor_morphological_distance_threshold.glsl
M	source/blender/gpu/shaders/compositor/compositor_projector_lens_distortion.glsl
M	source/blender/gpu/shaders/compositor/compositor_realize_on_domain.glsl
M	source/blender/gpu/shaders/gpu_shader_codegen_lib.glsl
M	source/blender/io/usd/intern/usd_reader_mesh.cc
M	source/blender/io/wavefront_obj/exporter/obj_export_io.hh
M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesrna/intern/rna_space.c
M	source/blender/nodes/composite/nodes/node_composite_image.cc
M	source/blender/nodes/shader/nodes/node_shader_bsdf_principled.cc
M	source/blender/python/generic/py_capi_utils.c
M	source/blender/windowmanager/intern/wm_event_system.cc

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

diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp
index fe16f19556e..6081c4626f0 100644
--- a/intern/cycles/blender/sync.cpp
+++ b/intern/cycles/blender/sync.cpp
@@ -682,9 +682,9 @@ void BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, BL::ViewLayer &b_v
   /* Cryptomatte stores two ID/weight pairs per RGBA layer.
    * User facing parameter is the number of pairs.
    *
-   * NOTE: Name channels lowercase rgba so that compression rules check in OpenEXR DWA code uses
-   * loseless compression. Reportedly this naming is the only one which works good from the
-   * interoperability point of view. Using xyzw naming is not portable. */
+   * NOTE: Name channels lowercase RGBA so that compression rules check in OpenEXR DWA code uses
+   * lossless compression. Reportedly this naming is the only one which works good from the
+   * interoperability point of view. Using XYZW naming is not portable. */
   int crypto_depth = divide_up(min(16, b_view_layer.pass_cryptomatte_depth()), 2);
   scene->film->set_cryptomatte_depth(crypto_depth);
   CryptomatteType cryptomatte_passes = CRYPT_NONE;
diff --git a/intern/cycles/device/optix/device_impl.cpp b/intern/cycles/device/optix/device_impl.cpp
index 8aac2b803f2..1b440ebb278 100644
--- a/intern/cycles/device/optix/device_impl.cpp
+++ b/intern/cycles/device/optix/device_impl.cpp
@@ -1416,7 +1416,7 @@ bool OptiXDevice::build_optix_bvh(BVHOptiX *bvh,
   options.operation = operation;
   if (use_fast_trace_bvh ||
       /* The build flags have to match the ones used to query the built-in curve intersection
-         program (see optixBuiltinISModuleGet above) */
+       * program (see optixBuiltinISModuleGet above) */
       build_input.type == OPTIX_BUILD_INPUT_TYPE_CURVES) {
     VLOG_INFO << "Using fast to trace OptiX BVH";
     options.buildFlags = OPTIX_BUILD_FLAG_PREFER_FAST_TRACE | OPTIX_BUILD_FLAG_ALLOW_COMPACTION;
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 5e3f8d839e9..29789a15b28 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -29,7 +29,7 @@ CCL_NAMESPACE_BEGIN
  *
  * Bounding volume hierarchy for ray tracing, when no native acceleration
  * structure is available for the device.
-
+ *
  * We compile different variations of the same BVH traversal function for
  * faster rendering when some types of primitives are not needed, using #includes
  * to work around the lack of C++ templates in OpenCL.
diff --git a/intern/cycles/kernel/device/oneapi/kernel_templates.h b/intern/cycles/kernel/device/oneapi/kernel_templates.h
index d8964d9b672..0ae925cf748 100644
--- a/intern/cycles/kernel/device/oneapi/kernel_templates.h
+++ b/intern/cycles/kernel/device/oneapi/kernel_templates.h
@@ -80,7 +80,7 @@ void oneapi_call(
   (x, ##__VA_ARGS__)
 
 /* This template automatically casts entries in the void **args array to the types requested by the kernel func.
-   Since kernel parameters are passed as void ** to the device, this is the closest that we have to type safety. */
+ * Since kernel parameters are passed as void ** to the device, this is the closest that we have to type safety. */
 #define oneapi_template(...) \
   template<ONEAPI_CALL_FOR(ONEAPI_TYP, __VA_ARGS__)> \
   void oneapi_call( \
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index 33a27ad3677..873d594f1f8 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -164,7 +164,7 @@ enum PathTraceDimension {
   PRNG_SUBSURFACE_DISK = 0,
   PRNG_SUBSURFACE_DISK_RESAMPLE = 1,
 
-  /* High enough number so we don't need to change it when adding new dimenions,
+  /* High enough number so we don't need to change it when adding new dimensions,
    * low enough so there is no uint16_t overflow with many bounces. */
   PRNG_BOUNCE_NUM = 16,
 };
@@ -1359,7 +1359,7 @@ static_assert_align(KernelShaderEvalInput, 16);
 
 /* Pre-computed sample table sizes for PMJ02 sampler.
  *
- * Note: divisions *must* be a power of two, and patterns
+ * NOTE: divisions *must* be a power of two, and patterns
  * ideally should be as well.
  */
 #define NUM_PMJ_DIVISIONS 32
diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h
index f01f439718f..399ee67a8fa 100644
--- a/intern/ghost/GHOST_C-api.h
+++ b/intern/ghost/GHOST_C-api.h
@@ -50,7 +50,7 @@ extern GHOST_TSuccess GHOST_DisposeSystem(GHOST_SystemHandle systemhandle);
  * \param message: Message of the message box.
  * \param help_label: Text to show on the help button that opens a link.
  * \param continue_label: Text to show on the ok button that continues.
- * \param link: Optional (hyper)link to a webpage to show when pressing help.
+ * \param link: Optional (hyper)link to a web-page to show when pressing help.
  * \param dialog_options: Options to configure the message box.
  */
 extern void GHOST_ShowMessageBox(GHOST_SystemHandle systemhandle,
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index b583d39dd1f..6cb36337b55 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -78,7 +78,7 @@
 #endif /* VK_GR_LESS */
 
 /**
-   Workaround for some laptop touch-pads, some of which seems to
+ * Workaround for some laptop touch-pads, some of which seems to
  * have driver issues which makes it so window function receives
  * the message, but #PeekMessage doesn't pick those messages for
  * some reason.
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 03629db0acd..3ddeaaaf1c7 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -223,7 +223,7 @@ void blf_batch_draw_begin(FontBLF *font)
     g_batch.ofs[1] = font->pos[1];
   }
   else {
-    /* Offset is baked in modelview mat. */
+    /* Offset is baked in model-view matrix. */
     zero_v2_int(g_batch.ofs);
   }
 
@@ -234,13 +234,13 @@ void blf_batch_draw_begin(FontBLF *font)
     bool mat_changed = equals_m4m4(gpumat, g_batch.mat) == false;
 
     if (mat_changed) {
-      /* Modelviewmat is no longer the same.
-       * Flush cache but with the previous mat. */
+      /* Model view matrix is no longer the same.
+       * Flush cache but with the previous matrix. */
       GPU_matrix_push();
       GPU_matrix_set(g_batch.mat);
     }
 
-    /* flush cache if config is not the same. */
+    /* Flush cache if configuration is not the same. */
     if (mat_changed || font_changed || shader_changed) {
       blf_batch_draw();
       g_batch.simple_shader = simple_shader;
@@ -253,7 +253,7 @@ void blf_batch_draw_begin(FontBLF *font)
 
     if (mat_changed) {
       GPU_matrix_pop();
-      /* Save for next memcmp. */
+      /* Save for next `memcmp`. */
       memcpy(g_batch.mat, gpumat, sizeof(g_batch.mat));
     }
   }
@@ -279,7 +279,7 @@ static GPUTexture *blf_batch_cache_texture_load(void)
     int offset_x = bitmap_len_landed % tex_width;
     int offset_y = bitmap_len_landed / tex_width;
 
-    /* TODO(germano): Update more than one row in a single call. */
+    /* TODO(@germano): Update more than one row in a single call. */
     while (remain) {
       int remain_row = tex_width - offset_x;
       int width = remain > remain_row ? remain_row : remain;
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 19fef1ce825..85ce647fcab 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -3624,16 +3624,6 @@ void nlasnapshot_blend_get_inverted_upper_snapshot(NlaEvalData *eval_data,
   }
 }
 
-/** Using \a blended_snapshot and \a upper_snapshot, we can solve for the \a r_lower_snapshot.
- *
- * Only channels that exist within \a blended_snapshot are processed.
- * Only blended values within the \a remap_domain are processed.
- *
- * Writes to \a r_upper_snapshot NlaEvalChannelSnapshot->remap_domain to match remapping success.
- *
- * Assumes caller marked upper values that are in the \a blend_domain. This determines whether the
- * blended value came directly from the lower snapshot or a result of blending.
- **/
 void nlasnapshot_blend_get_inverted_lower_snapshot(NlaEvalData *eval_data,
                                                    NlaEvalSnapshot *blended_snapshot,
                                                    NlaEvalSnapshot *upper_snapshot,
diff --git a/source/blender/blenkernel/intern/curves.cc b/source/blender/blenkernel/intern/curves.cc
index 6211f6b7be6..c6e7bb72f53 100644
--- a/source/blender/blenkernel/intern/curves.cc
+++ b/source/blender/blenkernel/intern/curves.cc
@@ -199,33 +199,33 @@ static void curves_blend_read_expand(BlendExpander *expander, ID *id)
 }
 
 IDTypeInfo IDType_ID_CV = {
-    /*id_code */ ID_CV,
-    /*id_filter */ FILTER_ID_CV,
-    /*main_listbase_index */ INDEX_ID_CV,
-    /*struct_size */ sizeof(Curves),
-    /*name */ "Curves",
-    /*name_plural */ "hair_curves",
-    /*translation_context */ BLT_I18NCONTEXT_ID_CURVES,
-    /*flags */ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
-    /*asset_type_info */ nullptr,
-
-    /*init_data */ curves_init_data,
-    /*copy_data */ curves_copy_data,
-    /*free_data */ curves_free_data,
-    /*make_local */ nullptr,
-    /*foreach_id */ curves_foreach_id,
-    /*foreach_cache */ nullptr,
-    /*foreach_path */ nullptr,
-    /*owner_get */ nullptr,
-
-    /*blend_write */ curves_blend_write,
-    /*blend_read_data */ curves_blend_read_data,
-    /*blend_read_lib */ curves_blend_read_lib,
-    /*blend_read_expand */ curves_blend_read_expand,
-
-    /*blend_read_undo_preserve */ nullptr,
-
-    /*lib_override_apply_post */ nullptr,
+    /* id_code */ ID_CV,
+    /* id_filter */ FILTER_ID_CV,
+    /* main_listbase_index */ INDEX_ID_CV,
+    /* struct_size */ sizeof(Curves),
+    /* name*/ "Curves",
+    /* name_plural */ "hair_curves",
+    /* translation_context */ BLT_I18NCONTEXT_ID_CURVES,
+    /* flags */ IDTYPE_FLAGS_APPEND_IS_REUSABLE,
+    /* asset_type_info */ nullptr,
+
+    /* init_data */ curves_init_data,
+    /* copy_data */ curves_copy_data,
+    /* free_data */ curves_free_data,
+    /* make_local */ nullptr,
+    

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list