From 2edc2393d2cda398c13105bb96779c83854fa2df Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Jul 2024 10:17:42 +1000 Subject: [PATCH] Cleanup: spelling in comments --- intern/cycles/integrator/denoiser.h | 2 +- intern/cycles/scene/light_tree.cpp | 4 ++-- intern/cycles/session/buffers.h | 2 +- intern/ghost/intern/GHOST_NDOFManager.cc | 2 +- scripts/modules/bl_i18n_utils/bl_extract_messages.py | 2 +- scripts/modules/bl_i18n_utils/utils_rtl.py | 2 +- source/blender/animrig/ANIM_action.hh | 2 +- source/blender/animrig/intern/action.cc | 2 +- source/blender/asset_system/intern/asset_storage.hh | 2 +- source/blender/blenkernel/intern/mesh_remesh_voxel.cc | 2 +- source/blender/blenlib/intern/BLI_kdopbvh.c | 2 +- source/blender/blenloader/intern/readfile.cc | 2 +- source/blender/draw/engines/eevee_next/eevee_camera.cc | 2 +- source/blender/draw/engines/eevee_next/eevee_film.hh | 4 ++-- source/blender/draw/engines/eevee_next/eevee_instance.cc | 2 +- .../engines/eevee_next/shaders/infos/eevee_material_info.hh | 2 +- source/blender/draw/engines/gpencil/gpencil_engine_c.cc | 2 +- source/blender/editors/animation/anim_filter.cc | 4 ++-- source/blender/editors/include/ED_view3d.hh | 2 +- source/blender/gpu/GPU_shader_shared.hh | 2 +- source/blender/gpu/vulkan/vk_pipeline_pool.hh | 6 +++--- source/blender/makesdna/DNA_lightprobe_types.h | 2 +- source/blender/makesrna/RNA_types.hh | 2 +- source/blender/makesrna/intern/rna_sculpt_paint.cc | 2 +- tools/check_source/check_spelling_config.py | 3 +++ 25 files changed, 32 insertions(+), 29 deletions(-) diff --git a/intern/cycles/integrator/denoiser.h b/intern/cycles/integrator/denoiser.h index 48668f98df3..3358014bd4b 100644 --- a/intern/cycles/integrator/denoiser.h +++ b/intern/cycles/integrator/denoiser.h @@ -34,7 +34,7 @@ class Denoiser { * This is checked in debug builds. * - The device might be MultiDevice. * - If Denoiser from params is not supported by provided denoise device, then Blender will - fallback on the OIDN CPU denoising and use provided cpu_fallback_device. */ + * fallback on the OIDN CPU denoising and use provided cpu_fallback_device. */ static unique_ptr create(Device *denoise_device, Device *cpu_fallback_device, const DenoiseParams ¶ms); diff --git a/intern/cycles/scene/light_tree.cpp b/intern/cycles/scene/light_tree.cpp index 37b3e9fb0e7..50f395cd797 100644 --- a/intern/cycles/scene/light_tree.cpp +++ b/intern/cycles/scene/light_tree.cpp @@ -191,8 +191,8 @@ LightTreeEmitter::LightTreeEmitter(Scene *scene, const float len_v = len(lamp->get_axisv()); const float len_w = len(lamp->get_dir()); - /* As `theta_e` approaches `pi/2`, the behaviour of `atan(tan(theta_e))` can become quite - * unpredicatable as `tan(x)` has an asymptote at `x = pi/2`. To avoid this, we skip the back + /* As `theta_e` approaches `pi/2`, the behavior of `atan(tan(theta_e))` can become quite + * unpredictable as `tan(x)` has an asymptote at `x = pi/2`. To avoid this, we skip the back * and forward conversion. * The conversion is required to deal with scaled lights, but near `pi/2` the scaling does * not make a big difference in the angle, so we can skip the conversion without worrying diff --git a/intern/cycles/session/buffers.h b/intern/cycles/session/buffers.h index 4528e01f7d1..dcd18fa7cfe 100644 --- a/intern/cycles/session/buffers.h +++ b/intern/cycles/session/buffers.h @@ -73,7 +73,7 @@ class BufferParams : public Node { int height = 0; /* Windows defines which part of the buffers is visible. The part outside of the window is - * considered an "overscan". + * considered an `overscan`. * * Window X and Y are relative to the position of the buffer in the full buffer. */ int window_x = 0; diff --git a/intern/ghost/intern/GHOST_NDOFManager.cc b/intern/ghost/intern/GHOST_NDOFManager.cc index 043116bdcb5..605299e8655 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.cc +++ b/intern/ghost/intern/GHOST_NDOFManager.cc @@ -510,7 +510,7 @@ void GHOST_NDOFManager::updateButton(int button_number, bool press, uint64_t tim { GHOST_NDOF_ButtonT button = static_cast(button_number); - /* For bistmask devices button maping isn't unified, therefore check the button map. */ + /* For bit-mask devices button mapping isn't unified, therefore check the button map. */ if (std::find(bitmask_devices_.begin(), bitmask_devices_.end(), device_type_) != bitmask_devices_.end()) { diff --git a/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/scripts/modules/bl_i18n_utils/bl_extract_messages.py index 9120a63fd5a..d295e3fa479 100644 --- a/scripts/modules/bl_i18n_utils/bl_extract_messages.py +++ b/scripts/modules/bl_i18n_utils/bl_extract_messages.py @@ -661,7 +661,7 @@ def dump_py_messages_from_files(msgs, reports, files, settings): for arg_pos, (arg_kw, arg) in enumerate(func.parameters.items()): if ((arg_kw in translate_kw) and (not arg.is_output) and (arg.type == 'STRING')): func_translate_args.setdefault(func_id, {})[arg_kw] = (arg_pos, {}) - # We manually add funcs from bpy.app.translations + # We manually add functions from `bpy.app.translations`. for func_id, func_ids in pgettext_variants: func_translate_args[func_id] = pgettext_variants_args for sub_func_id in func_ids: diff --git a/scripts/modules/bl_i18n_utils/utils_rtl.py b/scripts/modules/bl_i18n_utils/utils_rtl.py index f46c8600530..30dd80cc7ca 100755 --- a/scripts/modules/bl_i18n_utils/utils_rtl.py +++ b/scripts/modules/bl_i18n_utils/utils_rtl.py @@ -58,7 +58,7 @@ FRIBIDI_FLAGS_ARABIC = FRIBIDI_FLAG_SHAPE_ARAB_PRES | FRIBIDI_FLAG_SHAPE_ARAB_LI MENU_DETECT_REGEX = re.compile("%x\\d+\\|") -##### Kernel processing funcs. ##### +##### Kernel processing functions. ##### def protect_format_seq(msg): """ Find some specific escaping/formatting sequences (like \", %s, etc., diff --git a/source/blender/animrig/ANIM_action.hh b/source/blender/animrig/ANIM_action.hh index 96c9117be97..46f6e512c4e 100644 --- a/source/blender/animrig/ANIM_action.hh +++ b/source/blender/animrig/ANIM_action.hh @@ -850,7 +850,7 @@ Span fcurves_for_action_slot(const Action &action, slot_handle_t * * This is a utility function whose purpose is unclear after multi-layer Actions are introduced. * It might still be useful, it might not be. - + * * The use of this function is an indicator for code that might have to be altered when * multi-layered Actions are getting implemented. */ diff --git a/source/blender/animrig/intern/action.cc b/source/blender/animrig/intern/action.cc index 466385139b0..934fe65b855 100644 --- a/source/blender/animrig/intern/action.cc +++ b/source/blender/animrig/intern/action.cc @@ -1172,7 +1172,7 @@ bool ChannelBag::fcurve_remove(FCurve &fcurve_to_remove) dna::array::remove_index( &this->fcurve_array, &this->fcurve_array_num, nullptr, fcurve_index, fcurve_ptr_destructor); - /* As an optimisation, this function could call `DEG_relations_tag_update(bmain)` to prune any + /* As an optimization, this function could call `DEG_relations_tag_update(bmain)` to prune any * relationships that are now no longer necessary. This is not needed for correctness of the * depsgraph evaluation results though. */ diff --git a/source/blender/asset_system/intern/asset_storage.hh b/source/blender/asset_system/intern/asset_storage.hh index e7d99ed0cd9..811e3f5ee33 100644 --- a/source/blender/asset_system/intern/asset_storage.hh +++ b/source/blender/asset_system/intern/asset_storage.hh @@ -29,7 +29,7 @@ class AssetLibrary; class AssetRepresentation; class AssetStorage { - /* Uses shared pointers so the UI can aquire weak pointers. It can then ensure pointers are not + /* Uses shared pointers so the UI can acquire weak pointers. It can then ensure pointers are not * dangling before accessing. */ using StorageT = Set>; diff --git a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc index efe066c1ab2..c2621f92433 100644 --- a/source/blender/blenkernel/intern/mesh_remesh_voxel.cc +++ b/source/blender/blenkernel/intern/mesh_remesh_voxel.cc @@ -509,7 +509,7 @@ void mesh_remesh_reproject_attributes(const Mesh &src, Mesh &dst) /* The main idea in the following code is to trade some complexity in sampling for the benefit of * only using and building a single BVH tree. Since sculpt mode doesn't generally deal with loose * vertices and edges, we use the standard "triangles" BVH which won't contain them. Also, only - * relying on a single BVH should reduce memory usage, and work better if the BVH and pbvh::Tree + * relying on a single BVH should reduce memory usage, and work better if the BVH and #pbvh::Tree * are ever merged. * * One key decision is separating building transfer index maps from actually transferring any diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index e01c5d6ca28..7879c9c46a7 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -47,7 +47,7 @@ #define MAX_TREETYPE 32 /* Setting zero so we can catch bugs in BLI_task/KDOPBVH. - * TODO(sergey): Deduplicate the limits with blender::bke::pbvh::Tree from BKE. + * TODO(sergey): Deduplicate the limits with #blender::bke::pbvh::Tree from BKE. */ #ifndef NDEBUG # define KDOPBVH_THREAD_LEAF_THRESHOLD 0 diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 62a3180e559..3b16d502cb5 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -255,7 +255,7 @@ static OldNewMap *oldnewmap_new() } /** - * \return `true` if the \a oldaddr key has been sucessfully added to the \a onm, and no existing + * \return `true` if the \a oldaddr key has been successfully added to the \a onm, and no existing * entry was overwritten. */ static bool oldnewmap_insert(OldNewMap *onm, const void *oldaddr, void *newaddr, int nr) diff --git a/source/blender/draw/engines/eevee_next/eevee_camera.cc b/source/blender/draw/engines/eevee_next/eevee_camera.cc index 69e9bb528ad..9160d288abc 100644 --- a/source/blender/draw/engines/eevee_next/eevee_camera.cc +++ b/source/blender/draw/engines/eevee_next/eevee_camera.cc @@ -95,7 +95,7 @@ void Camera::sync() int2 display_extent = inst_.film.display_extent_get(); int2 film_extent = inst_.film.film_extent_get(); int2 film_offset = inst_.film.film_offset_get(); - /* Overscan in film pixel. Not the same as `render_overscan_get`. */ + /* Over-scan in film pixel. Not the same as `render_overscan_get`. */ int film_overscan = inst_.film.overscan_pixels_get(overscan_, film_extent); rcti film_rect; diff --git a/source/blender/draw/engines/eevee_next/eevee_film.hh b/source/blender/draw/engines/eevee_next/eevee_film.hh index fc53eb8066f..57b0c966091 100644 --- a/source/blender/draw/engines/eevee_next/eevee_film.hh +++ b/source/blender/draw/engines/eevee_next/eevee_film.hh @@ -86,8 +86,8 @@ class Film { int2 display_extent; eViewLayerEEVEEPassType enabled_passes_ = eViewLayerEEVEEPassType(0); - /* Store the pass types needed by the viewport compositor separatly, because some passes might be - * enabled but not used by the viewport compositor, so they needn't be written. */ + /* Store the pass types needed by the viewport compositor separately, because some passes might + * be enabled but not used by the viewport compositor, so they needn't be written. */ eViewLayerEEVEEPassType viewport_compositor_enabled_passes_ = eViewLayerEEVEEPassType(0); PassCategory enabled_categories_ = PassCategory(0); bool use_reprojection_ = false; diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.cc b/source/blender/draw/engines/eevee_next/eevee_instance.cc index 04b26f75712..d663b90e919 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.cc +++ b/source/blender/draw/engines/eevee_next/eevee_instance.cc @@ -523,7 +523,7 @@ void Instance::render_frame(RenderEngine *engine, RenderLayer *render_layer, con if ((sampling.sample_index() == 1) || ((sampling.sample_index() % 25) == 0) || sampling.finished()) { - /* TODO: Use fmt. */ + /* TODO: Use `fmt`. */ std::string re_info = "Rendering " + std::to_string(sampling.sample_index()) + " / " + std::to_string(sampling.sample_count()) + " samples"; RE_engine_update_stats(engine, nullptr, re_info.c_str()); diff --git a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh index 3f6e80e5acc..7410deb13da 100644 --- a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh +++ b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh @@ -278,7 +278,7 @@ GPU_SHADER_CREATE_INFO(eevee_surf_shadow_tbdr) .define("SHADOW_UPDATE_TBDR") .builtins(BuiltinBits::LAYER) /* Use greater depth write to avoid loosing the early Z depth test but ensure correct fragment - ordering after slope bias. */ + * ordering after slope bias. */ .depth_write(DepthWrite::GREATER) /* F32 color attachment for on-tile depth accumulation without atomics. */ .fragment_out(0, Type::FLOAT, "out_depth", DualBlend::NONE, SHADOW_ROG_ID); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine_c.cc b/source/blender/draw/engines/gpencil/gpencil_engine_c.cc index 84f79e5a544..331e6cd38de 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine_c.cc +++ b/source/blender/draw/engines/gpencil/gpencil_engine_c.cc @@ -790,7 +790,7 @@ static GPENCIL_tObject *grease_pencil_object_cache_populate(GPENCIL_PrivateData visible_strokes.foreach_index([&](const int stroke_i, const int pos) { const IndexRange points = points_by_curve[stroke_i]; - /* The material index is allowed to be negative as it's stored as a generic attribure. We + /* The material index is allowed to be negative as it's stored as a generic attribute. We * clamp it here to avoid crashing in the rendering code. Any stroke with a material < 0 will * use the first material in the first material slot.*/ const int material_index = std::max(stroke_materials[stroke_i], 0); diff --git a/source/blender/editors/animation/anim_filter.cc b/source/blender/editors/animation/anim_filter.cc index f1a7515b22d..5259a8f2aff 100644 --- a/source/blender/editors/animation/anim_filter.cc +++ b/source/blender/editors/animation/anim_filter.cc @@ -1573,9 +1573,9 @@ static size_t animfilter_action_slots(bAnimContext *ac, BLI_assert(slot); /* In some cases (see `ob_to_keylist()` and friends) fake bDopeSheet and fake bAnimContext are - * created. These are mostly null-initialised, and so do not have a bmain. This means that + * created. These are mostly null-initialized, and so do not have a bmain. This means that * lookup of the animated ID is not possible, which can result in failure to look up the proper - * F-Curve display name. For the `..._to_keylist` functions that doens't matter, as those are + * F-Curve display name. For the `..._to_keylist` functions that doesn't matter, as those are * only interested in the key data anyway. So rather than trying to get a reliable `bmain` * through the maze, this code just treats it as optional (even though ideally it should always * be known). */ diff --git a/source/blender/editors/include/ED_view3d.hh b/source/blender/editors/include/ED_view3d.hh index 372281ab678..af32ed23686 100644 --- a/source/blender/editors/include/ED_view3d.hh +++ b/source/blender/editors/include/ED_view3d.hh @@ -1311,7 +1311,7 @@ void ED_view3d_buttons_region_layout_ex(const bContext *C, * \param frame_selected Frame the newly out-of-local view to show currently visible selected * objects. Will only do something if a valid #depsgraph pointer is also provided. * \param smooth_viewtx Smooth transition time (in milliseconds) between current view and final - * view, if changes are hapenning. Currently only used if #frame_selected is enabled. + * view, if changes are happening. Currently only used if #frame_selected is enabled. * * \return `true` if the local view was actually exited. */ diff --git a/source/blender/gpu/GPU_shader_shared.hh b/source/blender/gpu/GPU_shader_shared.hh index 938f66bac21..b4b824c91e1 100644 --- a/source/blender/gpu/GPU_shader_shared.hh +++ b/source/blender/gpu/GPU_shader_shared.hh @@ -120,7 +120,7 @@ struct SeqStripDrawData { /* Horizontal strip positions (1.0 is one frame). */ float left_handle, right_handle; /* Left and right strip sides. */ float content_start, content_end; /* Start and end of actual content (only relevant for strips - that have holdout regions). */ + * that have holdout regions). */ float handle_width; /* Vertical strip positions (1.0 is one channel). */ float bottom; diff --git a/source/blender/gpu/vulkan/vk_pipeline_pool.hh b/source/blender/gpu/vulkan/vk_pipeline_pool.hh index 875f97188cb..21c5d1c4907 100644 --- a/source/blender/gpu/vulkan/vk_pipeline_pool.hh +++ b/source/blender/gpu/vulkan/vk_pipeline_pool.hh @@ -51,11 +51,11 @@ struct VKGraphicsInfo { bool operator==(const VertexIn &other) const { - // TODO: use an exact implementation and remove the hash compare. - /* + /* TODO: use an exact implementation and remove the hash compare. */ +#if 0 return vk_topology == other.vk_topology && attributes.hash() == other.attributes.hash() && bindings.hash() == other.bindings.hash(); - */ +#endif return hash() == other.hash(); } diff --git a/source/blender/makesdna/DNA_lightprobe_types.h b/source/blender/makesdna/DNA_lightprobe_types.h index f27c6d82bbf..bc8d0e574cc 100644 --- a/source/blender/makesdna/DNA_lightprobe_types.h +++ b/source/blender/makesdna/DNA_lightprobe_types.h @@ -188,7 +188,7 @@ typedef struct LightCache { LightCacheTexture cube_tx; /** Does not contains valid GPUTexture, only data. */ LightCacheTexture *cube_mips; - /* All lightprobes data contained in the cache. */ + /* All light-probes data contained in the cache. */ LightProbeCache *cube_data; LightGridCache *grid_data; } LightCache; diff --git a/source/blender/makesrna/RNA_types.hh b/source/blender/makesrna/RNA_types.hh index fba8d2aa86c..69cb73df176 100644 --- a/source/blender/makesrna/RNA_types.hh +++ b/source/blender/makesrna/RNA_types.hh @@ -235,7 +235,7 @@ enum PropertyFlag { */ PROP_HIDDEN = (1 << 19), /** - * Donnot preserve the last value for repeated operator calls. + * Doesn't preserve the last value for repeated operator calls. * * Also don't save in presets, as if #PROP_SKIP_PRESET was set. */ diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.cc b/source/blender/makesrna/intern/rna_sculpt_paint.cc index f6de384919c..9d8ee59e57f 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.cc +++ b/source/blender/makesrna/intern/rna_sculpt_paint.cc @@ -483,7 +483,7 @@ static void rna_PaintModeSettings_canvas_source_update(bContext *C, PointerRNA * { Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); - /* When canvas source changes the pbvh::Tree would require updates when switching between color + /* When canvas source changes the #pbvh::Tree would require updates when switching between color * attributes. */ if (ob && ob->type == OB_MESH) { BKE_texpaint_slots_refresh_object(scene, ob); diff --git a/tools/check_source/check_spelling_config.py b/tools/check_source/check_spelling_config.py index de3d2ec00bf..35912ba7bf2 100644 --- a/tools/check_source/check_spelling_config.py +++ b/tools/check_source/check_spelling_config.py @@ -45,6 +45,7 @@ dict_custom = { "allocators", "anisotropic", "anisotropy", + "asymptote", "atomicity", "attachmentless", "attenuations", @@ -415,6 +416,7 @@ dict_custom = { "unadjusted", "unalignable", "unallocated", + "unanimated", "unapplied", "unapply", "unassign", @@ -478,6 +480,7 @@ dict_custom = { "unmaximized", "unmeasurable", "unminimize", + "unmodulated", "unmute", "unnormalize", "unnormalized",