From d1e6c8f5a6a0d1319d0cd97c2425ce11309f64fb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Jun 2023 12:21:56 +1000 Subject: [PATCH] Cleanup: spelling in comments --- intern/ghost/intern/GHOST_ContextWGL.cc | 2 +- source/blender/blenkernel/intern/rigidbody.c | 2 +- source/blender/blenkernel/intern/sound.c | 2 +- source/blender/blenkernel/intern/tracking_util.cc | 2 +- source/blender/compositor/nodes/COM_ImageNode.cc | 2 +- .../realtime_compositor/intern/shader_operation.cc | 2 +- source/blender/draw/engines/eevee/eevee_volumes.c | 2 +- .../engines/eevee_next/eevee_irradiance_cache.hh | 2 +- .../draw/engines/eevee_next/eevee_lightcache.cc | 4 ++-- .../draw/engines/eevee_next/eevee_lightprobe.cc | 2 +- .../draw/engines/eevee_next/eevee_shader_shared.hh | 4 ++-- source/blender/draw/tests/eevee_test.cc | 14 +++++++------- .../editors/animation/anim_channels_defines.cc | 9 ++++----- source/blender/editors/animation/keyframes_edit.cc | 2 +- .../interface/eyedroppers/eyedropper_colorband.cc | 2 +- source/blender/editors/physics/rigidbody_object.c | 2 +- source/blender/editors/screen/screen_ops.c | 2 +- .../freestyle/intern/view_map/Interface0D.h | 2 +- source/blender/makesdna/DNA_documentation.h | 2 +- source/blender/makesdna/intern/dna_utils.c | 2 +- source/blender/makesdna/intern/makesdna.c | 2 +- source/blender/render/intern/texture_image.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 6 +++--- tools/check_source/check_spelling_c_config.py | 10 ++++++++++ 24 files changed, 46 insertions(+), 37 deletions(-) diff --git a/intern/ghost/intern/GHOST_ContextWGL.cc b/intern/ghost/intern/GHOST_ContextWGL.cc index abc67ddb107..63ea43e452f 100644 --- a/intern/ghost/intern/GHOST_ContextWGL.cc +++ b/intern/ghost/intern/GHOST_ContextWGL.cc @@ -351,7 +351,7 @@ struct DummyContextWGL { 0, 0, 0, - 0, /* accum bits (ignored) */ + 0, /* Accumulation bits (ignored). */ 0, /* depth buffer */ 0, /* stencil buffer */ 0, /* no auxiliary buffers */ diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 45f8cb7592a..a966de2d478 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -1790,7 +1790,7 @@ static void rigidbody_update_simulation(Depsgraph *depsgraph, rigidbody_validate_sim_shape(rbw, ob, true); /* now tell RB sim about it */ /* XXX: we assume that this can only get applied for active/passive shapes - * that will be included as rigidbodies. */ + * that will be included as rigid-bodies. */ if (rbo->shared->physics_object != NULL && rbo->shared->physics_shape != NULL) { RB_body_set_collision_shape(rbo->shared->physics_object, rbo->shared->physics_shape); } diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 23414b55e94..593a1d18647 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -549,7 +549,7 @@ static void sound_load_audio(Main *bmain, bSound *sound, bool free_waveform) /* load sound */ PackedFile *pf = sound->packedfile; - /* don't modify soundact->sound->filepath, only change a copy */ + /* Don't modify `sound->filepath`, only change a copy. */ STRNCPY(fullpath, sound->filepath); BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id)); diff --git a/source/blender/blenkernel/intern/tracking_util.cc b/source/blender/blenkernel/intern/tracking_util.cc index 697708a6da2..a3336fd70f1 100644 --- a/source/blender/blenkernel/intern/tracking_util.cc +++ b/source/blender/blenkernel/intern/tracking_util.cc @@ -673,7 +673,7 @@ static ImBuf *accessor_get_ibuf(TrackingImageAccessor *accessor, { /* First try to get fully processed image from the cache. */ CACHE_PRINTF("Calculate new buffer for frame %d\n", frame); - /* And now we do postprocessing of the original frame. */ + /* And now we do post-processing of the original frame. */ ImBuf *orig_ibuf = accessor_get_preprocessed_ibuf(accessor, clip_index, frame); if (orig_ibuf == nullptr) { return nullptr; diff --git a/source/blender/compositor/nodes/COM_ImageNode.cc b/source/blender/compositor/nodes/COM_ImageNode.cc index d3244cfdd88..ef3219621e7 100644 --- a/source/blender/compositor/nodes/COM_ImageNode.cc +++ b/source/blender/compositor/nodes/COM_ImageNode.cc @@ -62,7 +62,7 @@ void ImageNode::convert_to_operations(NodeConverter &converter, int framenumber = context.get_framenumber(); bool output_straight_alpha = (editor_node->custom1 & CMP_NODE_IMAGE_USE_STRAIGHT_OUTPUT) != 0; BKE_image_user_frame_calc(image, imageuser, context.get_framenumber()); - /* force a load, we assume iuser index will be set OK anyway */ + /* Force a load, we assume #ImageUser index will be set OK anyway. */ if (image && image->type == IMA_TYPE_MULTILAYER) { bool is_multilayer_ok = false; ImBuf *ibuf = BKE_image_acquire_ibuf(image, imageuser, nullptr); diff --git a/source/blender/compositor/realtime_compositor/intern/shader_operation.cc b/source/blender/compositor/realtime_compositor/intern/shader_operation.cc index 302ffa36e4c..0999c64aaf7 100644 --- a/source/blender/compositor/realtime_compositor/intern/shader_operation.cc +++ b/source/blender/compositor/realtime_compositor/intern/shader_operation.cc @@ -289,7 +289,7 @@ void ShaderOperation::populate_results_for_node(DNode node, GPUMaterial *materia doutput, [&](DNode node) { return !compile_unit_.contains(node); }); /* If the output is used as the node preview, then an output result needs to be populated for - * it, and we additionally keep track of that output to later compute the previes from. */ + * it, and we additionally keep track of that output to later compute the previews from. */ const bool is_preview_output = doutput == preview_output; if (is_preview_output) { preview_outputs_.add(doutput); diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 981eba68734..90e98e8273c 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -642,7 +642,7 @@ void EEVEE_volumes_output_accumulate(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_ EEVEE_EffectsInfo *effects = vedata->stl->effects; if (fbl->volumetric_accum_fb != NULL) { - /* Accum pass */ + /* Accumulation pass. */ GPU_framebuffer_bind(fbl->volumetric_accum_fb); /* Clear texture. */ diff --git a/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.hh b/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.hh index 9f9ca0ffdd8..857b4e03690 100644 --- a/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.hh +++ b/source/blender/draw/engines/eevee_next/eevee_irradiance_cache.hh @@ -43,7 +43,7 @@ class IrradianceBake { Framebuffer empty_raster_fb_ = {"empty_raster_fb_"}; /** Evaluate light object contribution and store result to surfel. */ PassSimple surfel_light_eval_ps_ = {"LightEval"}; - /** Create linked list of surfel to emulated raycast. */ + /** Create linked list of surfel to emulated ray-cast. */ PassSimple surfel_ray_build_ps_ = {"RayBuild"}; /** Propagate light from surfel to surfel. */ PassSimple surfel_light_propagate_ps_ = {"LightPropagate"}; diff --git a/source/blender/draw/engines/eevee_next/eevee_lightcache.cc b/source/blender/draw/engines/eevee_next/eevee_lightcache.cc index 5df98e7d8e4..82a97767048 100644 --- a/source/blender/draw/engines/eevee_next/eevee_lightcache.cc +++ b/source/blender/draw/engines/eevee_next/eevee_lightcache.cc @@ -63,7 +63,7 @@ class LightBake { /** Manager used for command submission. Created and freed in the worker thread. */ draw::Manager *manager_ = nullptr; - /** Lightprobe original objects to bake. */ + /** Light-probe original objects to bake. */ Vector original_probes_; /** Frame to copy to original objects during update. This is needed to avoid race conditions. */ Vector bake_result_; @@ -245,7 +245,7 @@ class LightBake { /* Bind context without GPU_render_begin(). */ context_enable(false); - /* Free GPU data (Textures, Framebuffers, etc...). */ + /* Free GPU data (Textures, Frame-buffers, etc...). */ delete instance_; delete manager_; diff --git a/source/blender/draw/engines/eevee_next/eevee_lightprobe.cc b/source/blender/draw/engines/eevee_next/eevee_lightprobe.cc index fb5575a71ea..553add22b49 100644 --- a/source/blender/draw/engines/eevee_next/eevee_lightprobe.cc +++ b/source/blender/draw/engines/eevee_next/eevee_lightprobe.cc @@ -122,7 +122,7 @@ void LightProbeModule::end_sync() if (grid_update_) { light_cache->flag |= LIGHTCACHE_UPDATE_GRID; } - /* TODO(fclem): Reflection Cubemap should capture albedo + normal and be + /* TODO(fclem): Reflection Cube-map should capture albedo + normal and be * relit at runtime. So no dependency like in the old system. */ if (cube_update_) { light_cache->flag |= LIGHTCACHE_UPDATE_CUBE; 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 92c8ce97b32..cac4d75dd4c 100644 --- a/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh +++ b/source/blender/draw/engines/eevee_next/eevee_shader_shared.hh @@ -328,7 +328,7 @@ struct AOVsInfoData { uint value_len; /** Id of the AOV to be displayed (from the start of the AOV array). -1 for combined. */ int display_id; - /** True if the AOV to be displayed is from the value accum buffer. */ + /** True if the AOV to be displayed is from the value accumulation buffer. */ bool1 display_is_value; }; BLI_STATIC_ASSERT_ALIGN(AOVsInfoData, 16) @@ -884,7 +884,7 @@ struct CaptureInfoData { float sample_count; /** 0 based sample index. */ float sample_index; - /** Transform of the lightprobe object. */ + /** Transform of the light-probe object. */ float4x4 irradiance_grid_local_to_world; /** Transform vectors from world space to local space. Does not have location component. */ /** TODO(fclem): This could be a float3x4 or a float3x3 if padded correctly. */ diff --git a/source/blender/draw/tests/eevee_test.cc b/source/blender/draw/tests/eevee_test.cc index e518267237e..3825ebb1f5b 100644 --- a/source/blender/draw/tests/eevee_test.cc +++ b/source/blender/draw/tests/eevee_test.cc @@ -1160,22 +1160,22 @@ static void test_eevee_surfel_list() Surfel surfel; /* NOTE: Expected link assumes linear increasing processing order [0->5]. But this is * multithreaded and we can't know the execution order in advance. */ - /* 0: Project to (1, 0) = list 1. Unsorted Next = -1; Next = -1; Prev = 3. */ + /* 0: Project to (1, 0) = list 1. Unsorted Next = -1; Next = -1; Previous = 3. */ surfel.position = {1.1f, 0.1f, 0.1f}; surfel_buf.append(surfel); - /* 1: Project to (1, 0) = list 1. Unsorted Next = 0; Next = 2; Prev = -1. */ + /* 1: Project to (1, 0) = list 1. Unsorted Next = 0; Next = 2; Previous = -1. */ surfel.position = {1.1f, 0.2f, 0.5f}; surfel_buf.append(surfel); - /* 2: Project to (1, 0) = list 1. Unsorted Next = 1; Next = 3; Prev = 1. */ + /* 2: Project to (1, 0) = list 1. Unsorted Next = 1; Next = 3; Previous = 1. */ surfel.position = {1.1f, 0.3f, 0.3f}; surfel_buf.append(surfel); - /* 3: Project to (1, 0) = list 1. Unsorted Next = 2; Next = 0; Prev = 2. */ + /* 3: Project to (1, 0) = list 1. Unsorted Next = 2; Next = 0; Previous = 2. */ surfel.position = {1.2f, 0.4f, 0.2f}; surfel_buf.append(surfel); - /* 4: Project to (1, 1) = list 3. Unsorted Next = -1; Next = -1; Prev = -1. */ + /* 4: Project to (1, 1) = list 3. Unsorted Next = -1; Next = -1; Previous = -1. */ surfel.position = {1.0f, 1.0f, 0.5f}; surfel_buf.append(surfel); - /* 5: Project to (0, 1) = list 2. Unsorted Next = -1; Next = -1; Prev = -1. */ + /* 5: Project to (0, 1) = list 2. Unsorted Next = -1; Next = -1; Previous = -1. */ surfel.position = {0.1f, 1.1f, 0.5f}; surfel_buf.append(surfel); @@ -1225,7 +1225,7 @@ static void test_eevee_surfel_list() list_start_buf.read(); surfel_buf.read(); - /* NOTE: All of these are unstable by definition (atomic + multithread). + /* NOTE: All of these are unstable by definition (atomic + multi-thread). * But should be consistent since we only dispatch one thread-group. */ /* Expect last added surfel index. It is the list start index before sorting. */ Vector expect_list_start = {-1, 3, 5, 4}; diff --git a/source/blender/editors/animation/anim_channels_defines.cc b/source/blender/editors/animation/anim_channels_defines.cc index a557322f665..44efa27b84a 100644 --- a/source/blender/editors/animation/anim_channels_defines.cc +++ b/source/blender/editors/animation/anim_channels_defines.cc @@ -497,9 +497,8 @@ static void *acf_summary_setting_ptr(bAnimListElem *ale, { bAnimContext *ac = (bAnimContext *)ale->data; - /* if data is valid, return pointer to active dopesheet's relevant flag - * - this is restricted to DopeSheet/Action Editor only - */ + /* If data is valid, return pointer to active dope-sheet's relevant flag + * - this is restricted to DopeSheet/Action Editor only. */ if ((ac->sl) && (ac->spacetype == SPACE_ACTION) && (setting == ACHANNEL_SETTING_EXPAND)) { SpaceAction *saction = (SpaceAction *)ac->sl; bDopeSheet *ads = &saction->ads; @@ -3828,7 +3827,7 @@ static bool acf_nlatrack_setting_valid(bAnimContext * /*ac*/, return false; } - /* ok - no tracks are solo'd, and this isn't being tweaked */ + /* Ok - no tracks are soloed, and this isn't being tweaked. */ return true; } /* unsupported - this track is being tweaked */ @@ -5416,7 +5415,7 @@ void ANIM_channel_draw_widgets(const bContext *C, /* Draw slider: * - Even if we can draw sliders for this view, we must also check that the channel-type * supports them (only F-Curves really can support them for now). - * - To make things easier, we use RNA-autobuts for this so that changes are + * - To make things easier, we use RNA-auto-buttons for this so that changes are * reflected immediately, wherever they occurred. * BUT, we don't use the layout engine, otherwise we'd get wrong alignment, * and wouldn't be able to auto-keyframe. diff --git a/source/blender/editors/animation/keyframes_edit.cc b/source/blender/editors/animation/keyframes_edit.cc index d65f8cea8bf..d0c3e97f552 100644 --- a/source/blender/editors/animation/keyframes_edit.cc +++ b/source/blender/editors/animation/keyframes_edit.cc @@ -119,7 +119,7 @@ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, } } - /* unset the F-Curve from the editdata now that it's done */ + /* Unset the F-Curve from the edit-data now that it's done. */ if (ked) { ked->fcu = nullptr; ked->curIndex = 0; diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc b/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc index 8be83d31e83..4b8b7dd5ffe 100644 --- a/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc +++ b/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc @@ -223,7 +223,7 @@ static int eyedropper_colorband_modal(bContext *C, wmOperator *op, const wmEvent return is_undo ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } case EYE_MODAL_SAMPLE_BEGIN: - /* enable accum and make first sample */ + /* Enable accumulate and make first sample. */ eye->sample_start = true; eyedropper_colorband_sample_point(C, eye, event->xy); eyedropper_colorband_apply(C, op); diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c index 8e68151eadf..4cebef67817 100644 --- a/source/blender/editors/physics/rigidbody_object.c +++ b/source/blender/editors/physics/rigidbody_object.c @@ -480,7 +480,7 @@ static int rigidbody_objects_calc_mass_exec(bContext *C, wmOperator *op) density = RNA_float_get(op->ptr, "density"); } - /* apply this to all selected objects (with rigidbodies)... */ + /* Apply this to all selected objects (with rigid-bodies). */ CTX_DATA_BEGIN (C, Object *, ob, selected_objects) { if (ob->rigidbody_object) { PointerRNA ptr; diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 2bcf84ee384..33264214141 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -822,7 +822,7 @@ static bool azone_clipped_rect_calc(const AZone *az, rcti *r_rect_clip) static void area_actionzone_get_rect(AZone *az, rcti *rect) { if (az->type == AZONE_REGION_SCROLL) { - /* For scroll azones use the area around the region's scrollbar location. */ + /* For scroll azones use the area around the region's scroll-bar location. */ rcti scroller_vert = (az->direction == AZ_SCROLL_HOR) ? az->region->v2d.hor : az->region->v2d.vert; BLI_rcti_translate(&scroller_vert, az->region->winrct.xmin, az->region->winrct.ymin); diff --git a/source/blender/freestyle/intern/view_map/Interface0D.h b/source/blender/freestyle/intern/view_map/Interface0D.h index 07d8c377d18..52cfda0b493 100644 --- a/source/blender/freestyle/intern/view_map/Interface0D.h +++ b/source/blender/freestyle/intern/view_map/Interface0D.h @@ -6,7 +6,7 @@ /** \file * \ingroup freestyle - * \brief Interface to 0D elts + * \brief Interface to 0D elements. */ #include diff --git a/source/blender/makesdna/DNA_documentation.h b/source/blender/makesdna/DNA_documentation.h index 42328132e8c..1cef0d298e1 100644 --- a/source/blender/makesdna/DNA_documentation.h +++ b/source/blender/makesdna/DNA_documentation.h @@ -4,7 +4,7 @@ /** \file * \ingroup DNA - * \page makesdna makesdna + * \page makesdna Make Struct DNA (`makesdna`) * * \section aboutdna About the DNA module * diff --git a/source/blender/makesdna/intern/dna_utils.c b/source/blender/makesdna/intern/dna_utils.c index 9b7cf4ba455..cd03e09eef1 100644 --- a/source/blender/makesdna/intern/dna_utils.c +++ b/source/blender/makesdna/intern/dna_utils.c @@ -5,7 +5,7 @@ /** \file * \ingroup DNA * - * Utilities for stand-alone makesdna.c and Blender to share. + * Utilities for stand-alone `makesdna.c` and Blender to share. */ #include diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 305d14bcb3a..0111af7df08 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -5,7 +5,7 @@ /** \file * \ingroup DNA * - * \brief Struct muncher for making SDNA. + * \brief Struct parser for generating SDNA. * * \section aboutmakesdnac About makesdna tool * diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index a93239990c7..9807a45ae4e 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -846,7 +846,7 @@ static void feline_eval(TexResult *texr, ImBuf *ibuf, float fx, float fy, afdata const float D = (EWA_MAXIDX + 1) * 0.25f * (du * du + dv * dv) / (AFD->majrad * AFD->majrad); float d; /* TXF alpha: cw = 0.0f; */ int n; /* TXF alpha: clip = 0; */ - /* have to use same scaling for du/dv here as for Ux/Vx/Uy/Vy (*after* D calc.) */ + /* Have to use same scaling for du/dv here as for Ux/Vx/Uy/Vy (*after* D is calculated.) */ du *= AFD->dusc; dv *= AFD->dvsc; d = texr->trgba[0] = texr->trgba[2] = texr->trgba[1] = texr->trgba[3] = 0.0f; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index ebb440f6a4f..b99c0388f0e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1800,7 +1800,7 @@ static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) static int wm_search_menu_invoke(bContext *C, wmOperator *op, const wmEvent *event) { - /* Exception for launching via spacebar */ + /* Exception for launching via space-bar. */ if (event->type == EVT_SPACEKEY) { bool ok = true; ScrArea *area = CTX_wm_area(C); @@ -1810,14 +1810,14 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, const wmEvent *eve ok = false; } else if (area->spacetype == SPACE_TEXT) { - /* So we can use the spacebar in the text editor. */ + /* So we can use the space-bar in the text editor. */ ok = false; } } else { Object *editob = CTX_data_edit_object(C); if (editob && editob->type == OB_FONT) { - /* So we can use the spacebar for entering text. */ + /* So we can use the space-bar for entering text. */ ok = false; } } diff --git a/tools/check_source/check_spelling_c_config.py b/tools/check_source/check_spelling_c_config.py index b2cf0bcb3ed..f7455e79cf8 100644 --- a/tools/check_source/check_spelling_c_config.py +++ b/tools/check_source/check_spelling_c_config.py @@ -52,6 +52,7 @@ dict_custom = { "breaked", "callables", "canonicalization", + "canonicalize", "canonicalized", "canonicalizing", "catadioptric", @@ -72,6 +73,7 @@ dict_custom = { "copyable", "counterforce", "criterium", + "crosshair", "crosstalk", "customizable", "deallocate", @@ -138,6 +140,7 @@ dict_custom = { "homogenous", "ideographic", "illuminant", + "imbricated", "impactful", "incrementation", "initializer", @@ -299,6 +302,7 @@ dict_custom = { "situationally", "skippable", "sortable", + "stepsize", "stitchable", "subclass", "subclasses", @@ -485,6 +489,7 @@ dict_custom = { "coord", "coords", "ctrl", # control (modifier key). + "init", "iter", # iteration. "multi", "numpad", # numeric-pad. @@ -509,6 +514,8 @@ dict_custom = { "codepage", "contructor", "decimator", + "decref", + "decrefed", "diff", "diffs", "endian", @@ -519,6 +526,8 @@ dict_custom = { "foo", "hashable", "http", + "incref", + "increfed", "intelisense", "jitter", "jittered", @@ -598,6 +607,7 @@ dict_custom = { "normals", "nurbs", "octree", + "quaternion", "quaternions", "radiosity", "reflectance",