diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h index 33593e9e341..150e413e001 100644 --- a/intern/cycles/kernel/types.h +++ b/intern/cycles/kernel/types.h @@ -1008,7 +1008,7 @@ enum ShaderDataFlag { SD_HOLDOUT = (1 << 5), /* Shader has non-zero volume extinction. */ SD_EXTINCTION = (1 << 6), - /* Shader has have volume phase (scatter) closure. */ + /* Shader has a volume phase (scatter) closure. */ SD_SCATTER = (1 << 7), /* Shader is being evaluated in a volume. */ SD_IS_VOLUME_SHADER_EVAL = (1 << 8), diff --git a/intern/cycles/scene/film.cpp b/intern/cycles/scene/film.cpp index c2eed004b54..2dc5d9ee685 100644 --- a/intern/cycles/scene/film.cpp +++ b/intern/cycles/scene/film.cpp @@ -702,7 +702,7 @@ void Film::finalize_passes(Scene *scene, const bool use_denoise) } } - /* Order from by components and type, This is required to for AOVs and cryptomatte passes, + /* Order from by components and type, This is required for AOVs and cryptomatte passes, * which the kernel assumes to be in order. Note this must use stable sort so cryptomatte * passes remain in the right order. */ new_passes.stable_sort(compare_pass_order); diff --git a/intern/cycles/scene/light_tree.cpp b/intern/cycles/scene/light_tree.cpp index 4541caf3a09..e6df64f8c0b 100644 --- a/intern/cycles/scene/light_tree.cpp +++ b/intern/cycles/scene/light_tree.cpp @@ -35,7 +35,7 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds return cone_a; } - /* Set cone a to always have the greater theta_o. */ + /* Set cone `a` to always have the greater `theta_o`. */ const OrientationBounds *a = &cone_a; const OrientationBounds *b = &cone_b; if (cone_b.theta_o > cone_a.theta_o) { @@ -47,20 +47,20 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds const float theta_d = safe_acosf(cos_a_b); const float theta_e = fmaxf(a->theta_e, b->theta_e); - /* Return axis and theta_o of a if it already contains b. */ - /* This should also be called when b is empty. */ + /* Return axis and `theta_o` of `a` if it already contains `b`. */ + /* This should also be called when `b` is empty. */ if (a->theta_o + 5e-4f >= fminf(M_PI_F, theta_d + b->theta_o)) { return OrientationBounds({a->axis, a->theta_o, theta_e}); } - /* Compute new theta_o that contains both a and b. */ + /* Compute new `theta_o` that contains both `a` and `b`. */ const float theta_o = (theta_d + a->theta_o + b->theta_o) * 0.5f; if (theta_o >= M_PI_F) { return OrientationBounds({a->axis, M_PI_F, theta_e}); } - /* Slerp between a and b. */ + /* Slerp between `a` and `b`. */ float3 new_axis; if (cos_a_b < -0.9995f) { /* Opposite direction, any orthogonal vector is fine. */ diff --git a/intern/cycles/util/math_float4.h b/intern/cycles/util/math_float4.h index de7e2f360c7..5373a228e86 100644 --- a/intern/cycles/util/math_float4.h +++ b/intern/cycles/util/math_float4.h @@ -463,10 +463,10 @@ ccl_device_inline float4 fabs(const float4 a) # endif } -/* The floating-point remainder of the division operation a / b calculated by this function is - * exactly the value a - iquot * b, where iquot is a / b with its fractional part truncated. +/* The floating-point remainder of the division operation `a / b` calculated by this function is + * exactly the value `a - iquot * b`, where `iquot` is `a / b with` its fractional part truncated. * - * The returned value has the same sign as a and is less than b in magnitude. */ + * The returned value has the same sign as `a` and is less than `b` in magnitude. */ ccl_device_inline float4 fmod(const float4 a, const float b) { # if defined(__KERNEL_NEON__) diff --git a/source/blender/blenkernel/BKE_mesh_types.hh b/source/blender/blenkernel/BKE_mesh_types.hh index 32d5ce5b620..af66778e94d 100644 --- a/source/blender/blenkernel/BKE_mesh_types.hh +++ b/source/blender/blenkernel/BKE_mesh_types.hh @@ -242,8 +242,8 @@ struct MeshRuntime { /** * Settings for lazily evaluating the subdivision on the CPU if needed. These are - * set in the modifier when GPU subdivision can be performed, and owned by the by - * the modifier in the object. + * set in the modifier when GPU subdivision can be performed, + * and owned by the modifier in the object. */ SubsurfRuntimeData *subsurf_runtime_data = nullptr; diff --git a/source/blender/blenkernel/intern/softbody.cc b/source/blender/blenkernel/intern/softbody.cc index c29295544a1..a8d676e8e62 100644 --- a/source/blender/blenkernel/intern/softbody.cc +++ b/source/blender/blenkernel/intern/softbody.cc @@ -3291,16 +3291,16 @@ static void softbody_reset(Object *ob, SoftBody *sb, float (*vertexCos)[3], int copy_v3_v3(bp->origT, bp->pos); bp->vec[0] = bp->vec[1] = bp->vec[2] = 0.0f; - /* the bp->prev*'s are for rolling back from a canceled try to propagate in time + /* The `bp->prev*` 's are for rolling back from a canceled try to propagate in time * adaptive step size algorithm in a nutshell: - * 1. set scheduled time step to new dtime - * 2. try to advance the scheduled time step, being optimistic execute it - * 3. check for success - * 3.a we 're fine continue, may be we can increase scheduled time again ?? if so, do so! - * 3.b we did exceed error limit --> roll back, shorten the scheduled time and try again at 2. - * 4. check if we did reach dtime - * 4.a nope we need to do some more at 2. - * 4.b yup we're done + * 1) set scheduled time step to new dtime + * 2) try to advance the scheduled time step, being optimistic execute it + * 3) check for success + * 3a) we 're fine continue, may be we can increase scheduled time again ?? if so, do so! + * 3b) we did exceed error limit --> roll back, shorten the scheduled time and try again at 2. + * 4) check if we did reach dtime + * 4a) nope we need to do some more at 2. + * 4b) yup we're done */ copy_v3_v3(bp->prevpos, bp->pos); diff --git a/source/blender/blenkernel/intern/subdiv_ccg.cc b/source/blender/blenkernel/intern/subdiv_ccg.cc index 5e7b512152c..55f6dbec710 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.cc +++ b/source/blender/blenkernel/intern/subdiv_ccg.cc @@ -1183,7 +1183,7 @@ static int adjacent_edge_point_index_from_coord(const SubdivCCG &subdiv_ccg, topology_refiner->base_level().GetEdgeVertices(adjacent_edge_index); /* Vertex index of an edge which is used to see whether edge points in the right direction. - * Tricky part here is that depending whether input coordinate is are maximum X or Y coordinate + * Tricky part here is that depending whether input coordinate is a maximum X or Y coordinate * of the grid we need to use different edge direction. * Basically, the edge adjacent to a previous loop needs to point opposite direction. */ int directional_edge_vertex_index = -1; diff --git a/source/blender/blenkernel/intern/tracking.cc b/source/blender/blenkernel/intern/tracking.cc index 977e4756272..8423ffa86ec 100644 --- a/source/blender/blenkernel/intern/tracking.cc +++ b/source/blender/blenkernel/intern/tracking.cc @@ -2546,7 +2546,7 @@ void BKE_tracking_distortion_bounds_deltas(MovieDistortion *distortion, /* The tracking distortion functions expect the coordinates to be in the space of the image * where the tracking camera was calibrated. So we first remap the coordinates into that space, * apply the distortion, then remap back to the original coordinates space. This is done by - * dividing the by the size then multiplying by the calibration size, making sure to add 0.5 to + * dividing by the size then multiplying by the calibration size, making sure to add 0.5 to * evaluate at the center of pixels. */ float2 coordinates = ((position + 0.5f) / float2(size)) * float2(calibration_size); /* Notice that the condition is inverted, that's because when we are undistorting, we compute diff --git a/source/blender/blenkernel/intern/volume_grid_file_cache.cc b/source/blender/blenkernel/intern/volume_grid_file_cache.cc index d9e02781a6e..880ec991b1f 100644 --- a/source/blender/blenkernel/intern/volume_grid_file_cache.cc +++ b/source/blender/blenkernel/intern/volume_grid_file_cache.cc @@ -20,7 +20,7 @@ namespace blender::bke::volume_grid::file_cache { */ struct GridCache { /** - * Grid returned by #readAllGridMetadata. This only contains a the meta-data and transform of + * Grid returned by #readAllGridMetadata. This only contains the meta-data and transform of * the grid, but not the tree. */ openvdb::GridBase::Ptr meta_data_grid; diff --git a/source/blender/blenlib/BLI_implicit_sharing.hh b/source/blender/blenlib/BLI_implicit_sharing.hh index b5ffca3b21d..e6b71918190 100644 --- a/source/blender/blenlib/BLI_implicit_sharing.hh +++ b/source/blender/blenlib/BLI_implicit_sharing.hh @@ -84,7 +84,7 @@ class ImplicitSharingInfo : NonCopyable, NonMovable { return strong_users_.load(std::memory_order_acquire) == 0; } - /** Call when a the data has a new additional owner. */ + /** Call when the data has a new additional owner. */ void add_user() const { BLI_assert(!this->is_expired()); diff --git a/source/blender/blenlib/BLI_index_mask.hh b/source/blender/blenlib/BLI_index_mask.hh index a40ec344c45..8b36e762d29 100644 --- a/source/blender/blenlib/BLI_index_mask.hh +++ b/source/blender/blenlib/BLI_index_mask.hh @@ -346,8 +346,8 @@ class IndexMask : private IndexMaskData { int64_t operator[](const RawMaskIterator &it) const; /** - * Get a new mask that contains a consecutive subset of this mask. Takes O(log n) time and but - * can reuse the memory from the source mask. + * Get a new mask that contains a consecutive subset of this mask. Takes O(log n) time + * but can reuse the memory from the source mask. */ IndexMask slice(IndexRange range) const; IndexMask slice(int64_t start, int64_t size) const; diff --git a/source/blender/blenlib/BLI_mesh_intersect.hh b/source/blender/blenlib/BLI_mesh_intersect.hh index dd566bf498e..ae93ca92ed0 100644 --- a/source/blender/blenlib/BLI_mesh_intersect.hh +++ b/source/blender/blenlib/BLI_mesh_intersect.hh @@ -67,7 +67,7 @@ std::ostream &operator<<(std::ostream &os, const Vert *v); * A Plane whose equation is `dot(norm, p) + d = 0`. * The norm and d fields are always present, but the norm_exact * and d_exact fields may be lazily populated. Since we don't - * store degenerate planes, we can tell if a the exact versions + * store degenerate planes, we can tell if the exact versions * are not populated yet by having `norm_exact == 0`. */ struct Plane { diff --git a/source/blender/blenlib/BLI_path_utils.hh b/source/blender/blenlib/BLI_path_utils.hh index 8de469050f0..8d5e6e588e1 100644 --- a/source/blender/blenlib/BLI_path_utils.hh +++ b/source/blender/blenlib/BLI_path_utils.hh @@ -201,7 +201,7 @@ void BLI_path_normalize_unc(char *path, int path_maxncpy); /** * Convert `path` to a canonical representation. * This is intended for system paths (passed in as command-line arguments of via scripts) - * which are valid in that they resolve to a file/directory and but could be `CWD` relative or + * which are valid in that they resolve to a file/directory but could be `CWD` relative or * contain redundant slashes that cause absolute/relative conversion to fail. * (specifically the `//` prefix used by Blender). * diff --git a/source/blender/blenlib/intern/BLI_mempool.cc b/source/blender/blenlib/intern/BLI_mempool.cc index 8ef700ccc3f..677a3001731 100644 --- a/source/blender/blenlib/intern/BLI_mempool.cc +++ b/source/blender/blenlib/intern/BLI_mempool.cc @@ -53,7 +53,7 @@ int64_t(c) << 16 | int64_t(b) << 8 | (a)) /** - * Important that this value is an is _not_ aligned with `sizeof(void *)`. + * Important that this value is not aligned with `sizeof(void *)`. * So having a pointer to 2/4/8... aligned memory is enough to ensure * the `freeword` will never be used. * To be safe, use a word that's the same in both directions. diff --git a/source/blender/blenlib/intern/storage_apple.mm b/source/blender/blenlib/intern/storage_apple.mm index 6545d26c9c5..b4a57afd89a 100644 --- a/source/blender/blenlib/intern/storage_apple.mm +++ b/source/blender/blenlib/intern/storage_apple.mm @@ -50,7 +50,7 @@ bool BLI_file_alias_target(const char *filepath, [targetURL getFileSystemRepresentation:r_targetpath maxLength:FILE_MAXDIR]; return false; } - /* Note that the if-condition may also change the value of `r_targetpath`. */ + /* Note that the `if` condition may also change the value of `r_targetpath`. */ if (![targetURL getFileSystemRepresentation:r_targetpath maxLength:FILE_MAXDIR]) { return false; } diff --git a/source/blender/bmesh/operators/bmo_extrude.cc b/source/blender/bmesh/operators/bmo_extrude.cc index f64b7695951..4c85a8a6a62 100644 --- a/source/blender/bmesh/operators/bmo_extrude.cc +++ b/source/blender/bmesh/operators/bmo_extrude.cc @@ -698,7 +698,7 @@ static void calc_solidify_normals(BMesh *bm) BM_ITER_MESH (e, &eiter, bm, BM_EDGES_OF_MESH) { - /* If the edge is not part of a the solidify region + /* If the edge is not part of the solidify region * its normal should not be considered */ if (!BMO_edge_flag_test(bm, e, EDGE_MARK)) { continue; diff --git a/source/blender/compositor/cached_resources/intern/distortion_grid.cc b/source/blender/compositor/cached_resources/intern/distortion_grid.cc index 863325bd7a3..3a277b3a7ad 100644 --- a/source/blender/compositor/cached_resources/intern/distortion_grid.cc +++ b/source/blender/compositor/cached_resources/intern/distortion_grid.cc @@ -86,7 +86,7 @@ DistortionGrid::DistortionGrid( /* The tracking distortion functions expect the coordinates to be in the space of the image * where the tracking camera was calibrated. So we first remap the coordinates into that space, * apply the distortion, then remap back to the original coordinates space. This is done by - * dividing the by the size then multiplying by the calibration size, making sure to add 0.5 to + * dividing by the size then multiplying by the calibration size, making sure to add 0.5 to * evaluate at the center of pixels. * * Subtract the lower left bounds delta since we are looping over the extended domain. */ diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index af11652bdf7..bd284f2071e 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -505,7 +505,7 @@ void deg_graph_tag_parameters_if_needed(Main *bmain, ~(ID_RECALC_SYNC_TO_EVAL | ID_RECALC_SELECT | ID_RECALC_BASE_FLAGS | ID_RECALC_SHADING | /* While drivers may use the current-frame, this value is assigned - * explicitly and doesn't require a the scene to be copied again. */ + * explicitly and doesn't require the scene to be copied again. */ ID_RECALC_FRAME_CHANGE); if (clean_flags == 0) { diff --git a/source/blender/draw/engines/eevee/eevee_precompute.hh b/source/blender/draw/engines/eevee/eevee_precompute.hh index 5d6e6a4a521..cc7ae5d29c6 100644 --- a/source/blender/draw/engines/eevee/eevee_precompute.hh +++ b/source/blender/draw/engines/eevee/eevee_precompute.hh @@ -44,7 +44,7 @@ class Precompute { } /** - * Write a the content of a texture to a PFM image file for inspection. + * Write the content of a texture to a PFM image file for inspection. * OpenGL texture coordinate convention with Y up is respected. */ template @@ -89,7 +89,7 @@ class Precompute { } /** - * Write a the content of a texture as a C++ header file array. + * Write the content of a texture as a C++ header file array. * The content is to be copied to `eevee_lut.cc` and formatted with `make format`. */ template diff --git a/source/blender/draw/engines/eevee/eevee_volume.hh b/source/blender/draw/engines/eevee/eevee_volume.hh index 0b9f59ed8cf..b96503c49b3 100644 --- a/source/blender/draw/engines/eevee/eevee_volume.hh +++ b/source/blender/draw/engines/eevee/eevee_volume.hh @@ -138,7 +138,7 @@ class VolumeModule { return enabled_ && use_lights_; } - /* Return a the future value of enabled() that will only be available after end_sync(). */ + /* Return the future value of enabled() that will only be available after end_sync(). */ bool will_enable() const; /* Returns the state of the module. */ diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 9862115df72..31f3084456c 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -814,10 +814,10 @@ class Texture : NonCopyable { /** * Layer range view cover only the given range. - * This can only called to create one range. + * This can only be called to create one range. * View is recreated if: * - The source texture is recreated. - * - The layer_len is different from the last call the this function. + * - The layer_len is different from the last call to this function. * IMPORTANT: It is not recreated if the layer_start is different from the last call. * IMPORTANT: If this view is recreated any reference to it should be updated. */ diff --git a/source/blender/editors/interface/interface_align.cc b/source/blender/editors/interface/interface_align.cc index 42d8458603d..bcacb89102c 100644 --- a/source/blender/editors/interface/interface_align.cc +++ b/source/blender/editors/interface/interface_align.cc @@ -233,17 +233,17 @@ static void block_align_proximity_compute(ButAlign *butal, ButAlign *butal_other * *
  * +-----------+-----------+
- * |   BUT 1   |   BUT 2   |
+ * |   BUT_1   |   BUT_2   |
  * |-----------------------+
- * |   BUT 3   |
+ * |   BUT_3   |
  * +-----------+
  * 
* - * Here, BUT 3 RIGHT side would not get 'dragged' to align with BUT 1 RIGHT side, - * since BUT 3 has not RIGHT neighbor. - * So, this function, when called with BUT 1, will 'walk' the whole column in \a side_s1 direction - * (TOP or DOWN when called for RIGHT side), and force buttons like BUT 3 to align as needed, - * if BUT 1 and BUT 3 were detected as needing top-right corner stitching in + * Here, BUT_3 RIGHT side would not get 'dragged' to align with BUT_1 RIGHT side, + * since BUT_3 has not RIGHT neighbor. + * So, this function, when called with BUT_1, will 'walk' the whole column in \a side_s1 direction + * (TOP or DOWN when called for RIGHT side), and force buttons like BUT_3 to align as needed, + * if BUT_1 and BUT_3 were detected as needing top-right corner stitching in * #block_align_proximity_compute() step. * * \note To avoid doing this twice, some stitching flags are cleared to break the diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index c9426b86278..2e4c90a2a7f 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -8263,7 +8263,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * const bool is_disabled = but->flag & UI_BUT_DISABLED || data->disable_force; - /* if but->pointype is set, but->poin should be too */ + /* If `but->pointype` is set, `but->poin` should be too. */ BLI_assert(!bool(but->pointype) || but->poin); /* Only hard-coded stuff here, button interactions with configurable diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_column_values.hh b/source/blender/editors/space_spreadsheet/spreadsheet_column_values.hh index 55949e1aa11..3d5e590ffe7 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_column_values.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_column_values.hh @@ -55,7 +55,7 @@ class ColumnValues final { /** * Get a good column width for the column name and values. * - * \param max_sample_size: If provided, only a subset of the column values is looked at to + * \param max_sample_size: If provided, only a subset of the column values are inspected to * determine the width. This is useful when there are lots of rows to avoid unnecessarily long * computations in drawing code. If provided, there is also an enforced minimum width to avoid * very narrow columns when the sampled values all happen to be very short. diff --git a/source/blender/editors/transform/transform_convert_sequencer.cc b/source/blender/editors/transform/transform_convert_sequencer.cc index cb923935c81..7dcf0968a62 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.cc +++ b/source/blender/editors/transform/transform_convert_sequencer.cc @@ -829,7 +829,7 @@ static void special_aftertrans_update__sequencer(bContext *C, TransInfo *t) sseq->flag &= ~SPACE_SEQ_DESELECT_STRIP_HANDLE; /* #freeSeqData in `transform_conversions.cc` does this - * keep here so the else at the end won't run. */ + * keep here so the `else` at the end won't run. */ if (t->state == TRANS_CANCEL) { return; } diff --git a/source/blender/gpu/GPU_framebuffer.hh b/source/blender/gpu/GPU_framebuffer.hh index 2dfe45c9fa4..08a9bff71ae 100644 --- a/source/blender/gpu/GPU_framebuffer.hh +++ b/source/blender/gpu/GPU_framebuffer.hh @@ -380,7 +380,7 @@ void GPU_framebuffer_default_size(GPUFrameBuffer *fb, int width, int height); * \{ */ /** - * Set a the viewport offset and size. + * Set the viewport offset and size. * These are reset to the original dimensions explicitly (using `GPU_framebuffer_viewport_reset()`) * or when binding the frame-buffer after modifying its attachments. * @@ -592,7 +592,7 @@ void GPU_framebuffer_read_color(GPUFrameBuffer *fb, void *r_data); /** - * Read a the color of the window screen as it is currently displayed (so the previously rendered + * Read the color of the window screen as it is currently displayed (so the previously rendered * back-buffer). * DEPRECATED: This isn't even working correctly on some implementation. * TODO: Emulate this by doing some slow texture copy on the backend side or try to read the areas diff --git a/source/blender/makesrna/RNA_types.hh b/source/blender/makesrna/RNA_types.hh index 21b05d8645f..1b112349849 100644 --- a/source/blender/makesrna/RNA_types.hh +++ b/source/blender/makesrna/RNA_types.hh @@ -628,7 +628,7 @@ struct RawArray { }; /** - * This struct is are typically defined in arrays which define an *enum* for RNA, + * This struct is typically defined in arrays which define an *enum* for RNA, * which is used by the RNA API both for user-interface and the Python API. */ struct EnumPropertyItem { diff --git a/source/blender/windowmanager/intern/wm_files.cc b/source/blender/windowmanager/intern/wm_files.cc index 5e395cb0d02..deacb553d4f 100644 --- a/source/blender/windowmanager/intern/wm_files.cc +++ b/source/blender/windowmanager/intern/wm_files.cc @@ -1754,7 +1754,7 @@ static void wm_history_file_update() * - A smaller thumbnail is stored in the `.blend` file itself, sized at #BLEN_THUMB_SIZE. * The size is kept small to prevent thumbnails bloating the size of `.blend` files. * - * The this thumbnail will be extracted if the file is shared or the local thumbnail cache + * The thumbnail will be extracted if the file is shared or the local thumbnail cache * is cleared. see: `blendthumb_extract.cc` for logic that extracts the thumbnail. * * \{ */