From e5deeafe92208cb06f561a6b91e6e3b17e9f79b7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 May 2025 11:11:48 +1000 Subject: [PATCH] Cleanup: spelling in comments (make check_spelling_*) --- intern/cycles/subd/split.cpp | 2 +- intern/cycles/subd/subpatch.h | 2 +- source/blender/blenkernel/intern/node.cc | 30 +++++++++---------- .../blender/draw/engines/eevee/eevee_film.cc | 5 ++-- .../eevee/shaders/eevee_gbuffer_lib.glsl | 2 +- .../blender/editors/asset/intern/asset_ops.cc | 3 +- .../space_sequencer/sequencer_select.cc | 2 +- source/blender/makesdna/DNA_anim_enums.h | 28 ++++++++--------- source/blender/makesdna/DNA_curve_enums.h | 2 +- source/blender/makesdna/DNA_modifier_enums.h | 2 +- source/blender/makesdna/DNA_theme_types.h | 4 +-- .../nodes/intern/volume_grid_function_eval.cc | 6 ++-- tools/triage/weekly_report.py | 4 +-- 13 files changed, 47 insertions(+), 45 deletions(-) diff --git a/intern/cycles/subd/split.cpp b/intern/cycles/subd/split.cpp index 6ea909a5103..8e94d910fa9 100644 --- a/intern/cycles/subd/split.cpp +++ b/intern/cycles/subd/split.cpp @@ -157,7 +157,7 @@ std::pair DiagSplit::T(const Patch *patch, res = limit_edge_factor(patch, uv_start, uv_end, res); /* Limit edge factor so we don't go beyond max depth. -3 is so that - * for triangle patches, all 3 edges get an oppportunity to get split. */ + * for triangle patches, all 3 edges get an opportunity to get split. */ if (depth >= DSPLIT_MAX_DEPTH - 3 && res == DSPLIT_NON_UNIFORM) { res = DSPLIT_MAX_SEGMENTS; } diff --git a/intern/cycles/subd/subpatch.h b/intern/cycles/subd/subpatch.h index 6032d9ecca1..65b880ac395 100644 --- a/intern/cycles/subd/subpatch.h +++ b/intern/cycles/subd/subpatch.h @@ -233,7 +233,7 @@ class SubPatch { int get_inner_grid_vert_triangle(int i, int j) const { - /* Rowows (1 + 2 + .. + j), and column i. */ + /* Rows `(1 + 2 + .. + j)`, and column `i`. */ const int offset = j * (j + 1) / 2 + i; assert(offset < calc_num_inner_verts()); return inner_grid_vert_offset + offset; diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 31104a93b6c..2fdff1ec979 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -1344,40 +1344,40 @@ static bool is_node_socket_supported(const bNodeSocket *sock) namespace versioning_internal { -/* Specific code required to properly handle older blendfiles (pre-2.83), where some node data +/* Specific code required to properly handle older blend-files (pre-2.83), where some node data * (like the sockets default values) were written as raw bytes buffer, without any DNA type * information. */ -/* Node socket default values were historicaly written and read as raw bytes buffers, without any +/* Node socket default values were historically written and read as raw bytes buffers, without any * DNA typing information. * - * The writing code was fixed in commit 50d5050e9c, which is included in the 2.83 release. However - * the matching reading code was only fixed in the 4.5 release. + * The writing code was fixed in commit `50d5050e9c`, which is included in the 2.83 release. + * However the matching reading code was only fixed in the 4.5 release. * - * So currently, reading code assumes that any blendfile >= 3.0 has correct DNA info for these + * So currently, reading code assumes that any blend-file >= 3.0 has correct DNA info for these * default values, and it keeps previous 'raw buffer' reading code for older ones. * * This means that special care must be taken when the various DNA types used for these default * values are modified, as a 'manual' version of DNA internal versioning must be performed on data - * from older blendfiles (see also #direct_link_node_socket_default_value). + * from older blend-files (see also #direct_link_node_socket_default_value). */ constexpr int MIN_BLENDFILE_VERSION_FOR_MODERN_NODE_SOCKET_DEFAULT_VALUE_READING = 300; /* The `_404` structs below are copies of DNA structs as they were in Blender 4.4 and before. Their * data layout should never have to be modified in any way, as it matches the expected data layout - * in the raw bytes buffers read from older blendfiles. + * in the raw bytes buffers read from older blend-files. * * NOTE: There is _no_ need to protect DNA structs definition in any way to ensure forward * compatibility, for the following reasons: - * - The DNA struct info _is_ properly written in blendfiles since 2.83. - * - When there is DNA info for a BHead in the blendfile, even if that BHead is ultimately + * - The DNA struct info _is_ properly written in blend-files since 2.83. + * - When there is DNA info for a #BHead in the blend-file, even if that #BHead is ultimately * 'read'/used as raw bytes buffer through a call to `BLO_read_data_address`, the actual - * reading of that BHead from the blendfile will have already gone through the lower-level 'DNA - * versioning' process, which means that DNA struct changes (like adding new properties, + * reading of that #BHead from the blend-file will have already gone through the lower-level + * 'DNA versioning' process, which means that DNA struct changes (like adding new properties, * increasing an array size, etc.) will be handled properly. - * - Blender versions prior to 3.6 will not be able to load any 4.0+ blendfiles without immediate - * crash, so trying to preserve forward compatibility for versions older than 2.83 would be - * totally pointless. + * - Blender versions prior to 3.6 will not be able to load any 4.0+ blend-files without + * immediate crash, so trying to preserve forward compatibility for versions older than + * 2.83 would be totally pointless. */ typedef struct bNodeSocketValueInt_404 { @@ -1460,7 +1460,7 @@ static void direct_link_node_socket_legacy_data_version_do( T_404 *orig_data = static_cast(*raw_data); *raw_data = nullptr; T *final_data = MEM_callocN(__func__); - /* Could use memcpy here, since we also require historic members of these DNA structs to + /* Could use `memcpy` here, since we also require historic members of these DNA structs to * never be moved or re-ordered. But better be verbose and explicit here. */ copy_fn(*final_data, *orig_data); *dest_data = final_data; diff --git a/source/blender/draw/engines/eevee/eevee_film.cc b/source/blender/draw/engines/eevee/eevee_film.cc index a25ec98e5a6..a4278668df7 100644 --- a/source/blender/draw/engines/eevee/eevee_film.cc +++ b/source/blender/draw/engines/eevee/eevee_film.cc @@ -642,8 +642,9 @@ void Film::end_sync() sync_mist(); - /* Update sample table length for specialization warmup. Otherwise, we will warm a specialization - * that is not actually used. We still need to update it once per sample afterward. */ + /* Update sample table length for specialization warm up. + * Otherwise, we will warm a specialization that is not actually used. + * We still need to update it once per sample afterward. */ update_sample_table(); inst_.manager->warm_shader_specialization(accumulate_ps_); diff --git a/source/blender/draw/engines/eevee/shaders/eevee_gbuffer_lib.glsl b/source/blender/draw/engines/eevee/shaders/eevee_gbuffer_lib.glsl index d97c4bdcffb..3b3b86ba36e 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_gbuffer_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_gbuffer_lib.glsl @@ -220,7 +220,7 @@ float gbuffer_ior_unpack(float ior_packed) float gbuffer_thickness_pack(float thickness) { /* TODO(fclem): If needed, we could increase precision by defining a ceiling value like the view - * distance and remap to it. Or tweak the hyperbole eq. */ + * distance and remap to it. Or tweak the hyperbole equality. */ /* NOTE: Sign encodes the thickness mode. */ /* Remap [0..+inf) to [0..1/2]. */ float thickness_packed = abs(thickness) / (1.0f + 2.0f * abs(thickness)); diff --git a/source/blender/editors/asset/intern/asset_ops.cc b/source/blender/editors/asset/intern/asset_ops.cc index 0bf6b45320f..f0dfad8a055 100644 --- a/source/blender/editors/asset/intern/asset_ops.cc +++ b/source/blender/editors/asset/intern/asset_ops.cc @@ -1397,9 +1397,10 @@ static bool screenshot_preview_poll(bContext *C) return WM_operator_winactive(C); } -/* This should be a generic operator for assets not linked to the poselib. */ static void ASSET_OT_screenshot_preview(wmOperatorType *ot) { + /* This should be a generic operator for assets not linked to the pose-library. */ + ot->name = "Capture screenshot preview"; ot->description = "Capture a screenshot to use as a preview for the selected asset"; ot->idname = "ASSET_OT_screenshot_preview"; diff --git a/source/blender/editors/space_sequencer/sequencer_select.cc b/source/blender/editors/space_sequencer/sequencer_select.cc index 32e351b82ec..2ec3a3d84e2 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.cc +++ b/source/blender/editors/space_sequencer/sequencer_select.cc @@ -1341,7 +1341,7 @@ wmOperatorStatus sequencer_select_exec(bContext *C, wmOperator *op) bool changed = false; /* Deselect everything for now. NOTE that this condition runs for almost every click with no - * modifiers. `sequencer_select_strip_impl` expects this and will reselect any strips in + * modifiers. `sequencer_select_strip_impl` expects this and will re-select any strips in * `selection`. */ if (deselect_all || (selection.strip1 && (extend == false && deselect == false && toggle == false))) diff --git a/source/blender/makesdna/DNA_anim_enums.h b/source/blender/makesdna/DNA_anim_enums.h index b50b102cd1b..c89da63c619 100644 --- a/source/blender/makesdna/DNA_anim_enums.h +++ b/source/blender/makesdna/DNA_anim_enums.h @@ -132,7 +132,7 @@ typedef enum eDriverTarget_Flag { /** used for targets that use the pchan_name instead of RNA path * (i.e. rotation difference) */ DTAR_FLAG_STRUCT_REF = (1 << 0), - /** idtype can only be 'Object' */ + /** The `idtype` can only be "Object". */ DTAR_FLAG_ID_OB_ONLY = (1 << 1), /* "local-space" flags. */ @@ -334,13 +334,13 @@ typedef enum eFCurve_Extend { /* curve coloring modes */ typedef enum eFCurve_Coloring { - /** automatically determine color using rainbow (calculated at drawtime) */ + /** Automatically determine color using rainbow (calculated at draw-time). */ FCURVE_COLOR_AUTO_RAINBOW = 0, - /** automatically determine color using XYZ (array index) <-> RGB */ + /** Automatically determine color using XYZ (array index) <-> RGB. */ FCURVE_COLOR_AUTO_RGB = 1, - /** automatically determine color where XYZ <-> RGB, but index(X) != 0 */ + /** Automatically determine color where XYZ <-> RGB, but index(X) != 0. */ FCURVE_COLOR_AUTO_YRGB = 3, - /** custom color */ + /** Custom color. */ FCURVE_COLOR_CUSTOM = 2, } eFCurve_Coloring; @@ -409,7 +409,7 @@ typedef enum eNlaStrip_Flag { NLASTRIP_FLAG_SYNC_LENGTH = (1 << 9), /* playback flags (may be overridden by F-Curves) */ - /** NLA strip blendin/out values are set automatically based on overlaps */ + /** NLA strip blend-in/out values are set automatically based on overlaps */ NLASTRIP_FLAG_AUTO_BLENDS = (1 << 10), /** NLA strip is played back in reverse order */ NLASTRIP_FLAG_REVERSE = (1 << 11), @@ -490,17 +490,17 @@ ENUM_OPERATORS(eKS_Settings, KEYINGSET_ABSOLUTE) /* Flags for use by keyframe creation/deletion calls */ typedef enum eInsertKeyFlags { INSERTKEY_NOFLAGS = 0, - /** only insert keyframes where they're needed */ + /** Only insert keyframes where they're needed. */ INSERTKEY_NEEDED = (1 << 0), - /** insert 'visual' keyframes where possible/needed */ + /** Insert "visual" keyframes where possible/needed. */ INSERTKEY_MATRIX = (1 << 1), - /** don't recalculate handles,etc. after adding key */ + /** Don't recalculate handles,etc. after adding key. */ INSERTKEY_FAST = (1 << 2), - /** don't realloc mem (or increase count, as array has already been set out) */ + /** Don't re-allocate memory (or increase count, as array has already been set out). */ /* INSERTKEY_FASTR = (1 << 3), */ /* UNUSED */ - /** only replace an existing keyframe (this overrides INSERTKEY_NEEDED) */ + /** Only replace an existing keyframe (this overrides #INSERTKEY_NEEDED). */ INSERTKEY_REPLACE = (1 << 4), - /** ignore user-prefs (needed for predictable API use) */ + /** Ignore user-preferences (needed for predictable API use). */ INSERTKEY_NO_USERPREF = (1 << 6), /** * Allow to make a full copy of new key into existing one, if any, @@ -508,9 +508,9 @@ typedef enum eInsertKeyFlags { * Used by copy/paste code. */ INSERTKEY_OVERWRITE_FULL = (1 << 7), - /** for cyclic FCurves, adjust key timing to preserve the cycle period and flow */ + /** For cyclic FCurves, adjust key timing to preserve the cycle period and flow. */ INSERTKEY_CYCLE_AWARE = (1 << 9), - /** don't create new F-Curves (implied by INSERTKEY_REPLACE) */ + /** Don't create new F-Curves (implied by #INSERTKEY_REPLACE). */ INSERTKEY_AVAILABLE = (1 << 10), } eInsertKeyFlags; ENUM_OPERATORS(eInsertKeyFlags, INSERTKEY_AVAILABLE); diff --git a/source/blender/makesdna/DNA_curve_enums.h b/source/blender/makesdna/DNA_curve_enums.h index 70d7765432c..493494b88ee 100644 --- a/source/blender/makesdna/DNA_curve_enums.h +++ b/source/blender/makesdna/DNA_curve_enums.h @@ -119,7 +119,7 @@ enum { CU_PRIM_CURVE = 0x100, /* 8 points circle */ CU_PRIM_CIRCLE = 0x200, - /* 4x4 patch Nurb */ + /* 4x4 patch NURB. */ CU_PRIM_PATCH = 0x300, CU_PRIM_TUBE = 0x400, CU_PRIM_SPHERE = 0x500, diff --git a/source/blender/makesdna/DNA_modifier_enums.h b/source/blender/makesdna/DNA_modifier_enums.h index 5cef2e9d9d9..9e3e7f9736a 100644 --- a/source/blender/makesdna/DNA_modifier_enums.h +++ b/source/blender/makesdna/DNA_modifier_enums.h @@ -62,7 +62,7 @@ typedef enum eLengthGpencil_Type { GP_LENGTH_ABSOLUTE = 1, } eLengthGpencil_Type; -/* Shinkwrap Modifier */ +/* Shrink-wrap Modifier */ /** #ShrinkwrapModifierData.shrinkType */ enum { diff --git a/source/blender/makesdna/DNA_theme_types.h b/source/blender/makesdna/DNA_theme_types.h index 31b3d513561..2559e299054 100644 --- a/source/blender/makesdna/DNA_theme_types.h +++ b/source/blender/makesdna/DNA_theme_types.h @@ -318,10 +318,10 @@ typedef struct ThemeSpace { /** Dope-sheet. */ unsigned char ds_channel[4], ds_subchannel[4], ds_ipoline[4]; - /** Keytypes. */ + /** Key-types. */ unsigned char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4], keytype_generated[4]; - /** Keytypes. */ + /** Key-types. */ unsigned char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4], keytype_generated_select[4]; unsigned char keyborder[4], keyborder_select[4]; diff --git a/source/blender/nodes/intern/volume_grid_function_eval.cc b/source/blender/nodes/intern/volume_grid_function_eval.cc index 5906bf6210f..4a2f6b6c69c 100644 --- a/source/blender/nodes/intern/volume_grid_function_eval.cc +++ b/source/blender/nodes/intern/volume_grid_function_eval.cc @@ -95,7 +95,7 @@ static void parallel_grid_topology_tasks_leaf_node(const LeafNodeT &node, const int on_count = node.onVoxelCount(); /* This number is somewhat arbitrary. 64 is a 1/8th of the number of voxels in a standard leaf - * which is 8x8x8. It's a trade-off between benefitting from the better performance of + * which is 8x8x8. It's a trade-off between benefiting from the better performance of * leaf-processing vs. processing more voxels in a batch. */ const int on_count_threshold = 64; if (on_count <= on_count_threshold) { @@ -283,7 +283,7 @@ BLI_NOINLINE static void process_leaf_node(const mf::MultiFunction &fn, const LeafNodeMask &input_leaf_mask = leaf_node->valueMask(); const LeafNodeMask missing_mask = leaf_node_mask & !input_leaf_mask; if (missing_mask.isOff()) { - /* All values availables, so reference the data directly. */ + /* All values available, so reference the data directly. */ params.add_readonly_single_input( GSpan(param_cpp_type, values.data(), values.size())); } @@ -418,7 +418,7 @@ BLI_NOINLINE static void process_voxels(const mf::MultiFunction &fn, const auto &tree = grid.tree(); /* Could try to cache the accessor across batches, but it's not straight forward since its * type depends on the grid type and thread-safety has to be maintained. It's likely not - * worth it because the cost is already negilible since we are processing a full batch. */ + * worth it because the cost is already negligible since we are processing a full batch. */ auto accessor = grid.getConstUnsafeAccessor(); MutableSpan values = scope.allocator().allocate_array(voxels_num); diff --git a/tools/triage/weekly_report.py b/tools/triage/weekly_report.py index 6ea5cde52fb..e9a2c9b97d5 100755 --- a/tools/triage/weekly_report.py +++ b/tools/triage/weekly_report.py @@ -153,7 +153,7 @@ def report_personal_weekly_get( name: str # Branches targeting this repository. Branch name is key. branches: dict[str, Branch] = field(default_factory=dict) - # Pull requests targeting this repository. Key is respository of the branch and the branch name. + # Pull requests targeting this repository. Key is repository of the branch and the branch name. prs: dict[str, PullRequest] = field(default_factory=dict) # Repositories containing any commit activity, identified by full name (e.g. "blender/blender"). @@ -222,7 +222,7 @@ def report_personal_weekly_get( # repository they are made for. For weekly reports it makes more sense to keep all branches and # PRs related to a single repository together, regardless of who happens to own them. # - # So the folling adds branches and PRs to a "target" repository, not the owning one. + # So the following adds branches and PRs to a "target" repository, not the owning one. target_repo_json = repo["parent"] # There's no parent repo if the branch is on the same repo. Treat the repo itself as target.