From bb6765f28fdde392976c38712c851d0ef8c75a2c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Mar 2021 09:35:12 +1100 Subject: [PATCH] Cleanup: spelling --- intern/cycles/kernel/split/kernel_path_init.h | 2 +- intern/ghost/intern/GHOST_WindowWin32.cpp | 4 ++-- intern/guardedalloc/MEM_guardedalloc.h | 2 +- source/blender/blenkernel/intern/DerivedMesh.cc | 2 +- source/blender/blenkernel/intern/editmesh_tangent.c | 2 +- source/blender/blenkernel/intern/fluid.c | 2 +- source/blender/blenkernel/intern/mesh.c | 2 +- source/blender/blenkernel/intern/mesh_tangent.c | 2 +- source/blender/blenlib/BLI_endian_switch_inline.h | 2 +- source/blender/blenlib/BLI_link_utils.h | 2 +- source/blender/blenlib/intern/BLI_memiter.c | 2 +- source/blender/blenlib/intern/BLI_mempool.c | 2 +- source/blender/blenlib/intern/array_store.c | 4 ++-- source/blender/blenlib/intern/array_utils.c | 2 +- source/blender/blenlib/intern/math_solvers.c | 2 +- source/blender/bmesh/intern/bmesh_interp.c | 4 ++-- source/blender/bmesh/intern/bmesh_iterators.c | 4 ++-- source/blender/bmesh/operators/bmo_connect.c | 2 +- source/blender/bmesh/operators/bmo_fill_grid.c | 4 ++-- source/blender/bmesh/operators/bmo_removedoubles.c | 2 +- source/blender/bmesh/operators/bmo_subdivide.c | 2 +- source/blender/bmesh/operators/bmo_subdivide_edgering.c | 2 +- source/blender/bmesh/tools/bmesh_decimate_collapse.c | 4 ++-- source/blender/bmesh/tools/bmesh_decimate_dissolve.c | 2 +- source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c | 4 ++-- source/blender/compositor/COM_defines.h | 2 +- source/blender/compositor/intern/COM_WorkScheduler.cc | 2 +- .../operations/COM_ColorBalanceLGGOperation.cc | 2 +- source/blender/datatoc/datatoc.c | 2 +- source/blender/draw/engines/overlay/overlay_image.c | 2 +- .../draw/engines/overlay/shaders/antialiasing_frag.glsl | 3 ++- .../engines/overlay/shaders/armature_stick_vert.glsl | 8 ++++---- source/blender/draw/engines/workbench/workbench_engine.c | 2 +- source/blender/draw/intern/draw_common.c | 2 +- source/blender/draw/intern/draw_manager.c | 2 +- source/blender/editors/curve/editcurve_paint.c | 2 +- source/blender/editors/include/ED_transverts.h | 9 ++++++--- source/blender/editors/interface/interface.c | 2 +- source/blender/editors/interface/interface_handlers.c | 6 +++--- source/blender/editors/interface/interface_layout.c | 2 +- .../blender/editors/interface/interface_region_tooltip.c | 2 +- source/blender/editors/interface/interface_templates.c | 8 ++++---- source/blender/editors/mask/mask_ops.c | 4 ++-- source/blender/editors/mesh/editmesh_knife.c | 2 +- source/blender/editors/mesh/editmesh_rip.c | 2 +- source/blender/editors/mesh/editmesh_tools.c | 8 ++++---- source/blender/editors/object/object_bake_api.c | 6 ++++-- source/blender/editors/physics/particle_edit.c | 2 +- source/blender/editors/render/render_internal.c | 6 ++++-- source/blender/editors/sculpt_paint/paint_image_proj.c | 2 +- source/blender/editors/space_buttons/buttons_ops.c | 2 +- source/blender/editors/space_file/file_ops.c | 2 +- source/blender/editors/space_file/filesel.c | 2 +- source/blender/editors/space_text/text_draw.c | 8 ++++---- source/blender/editors/space_view3d/view3d_iterators.c | 8 ++++---- source/blender/editors/space_view3d/view3d_utils.c | 2 +- .../blender/editors/transform/transform_convert_mask.c | 2 +- .../blender/editors/transform/transform_convert_node.c | 2 +- source/blender/editors/transform/transform_mode_bend.c | 2 +- .../editors/transform/transform_mode_edge_slide.c | 2 +- .../editors/transform/transform_mode_timetranslate.c | 2 +- source/blender/gpu/opengl/gl_debug_layer.cc | 2 +- source/blender/makesdna/DNA_mesh_types.h | 2 +- source/blender/makesdna/DNA_modifier_types.h | 2 +- source/blender/makesdna/DNA_node_types.h | 2 +- source/blender/makesrna/intern/rna_define.c | 4 ++-- source/blender/makesrna/intern/rna_mesh.c | 2 +- source/blender/modifiers/intern/MOD_decimate.c | 2 +- source/blender/modifiers/intern/MOD_dynamicpaint.c | 2 +- source/blender/modifiers/intern/MOD_meshcache_pc2.c | 2 +- source/blender/python/generic/py_capi_utils.c | 2 +- source/blender/python/intern/bpy_gizmo_wrap.c | 2 +- source/blender/windowmanager/WM_api.h | 2 +- source/blender/windowmanager/intern/wm_operators.c | 4 ++-- source/blender/windowmanager/intern/wm_window.c | 6 +++--- 75 files changed, 116 insertions(+), 108 deletions(-) diff --git a/intern/cycles/kernel/split/kernel_path_init.h b/intern/cycles/kernel/split/kernel_path_init.h index 82b0f583d8d..c686f46a0cd 100644 --- a/intern/cycles/kernel/split/kernel_path_init.h +++ b/intern/cycles/kernel/split/kernel_path_init.h @@ -26,7 +26,7 @@ ccl_device void kernel_path_init(KernelGlobals *kg) int ray_index = ccl_global_id(0) + ccl_global_id(1) * ccl_global_size(0); /* This is the first assignment to ray_state; - * So we dont use ASSIGN_RAY_STATE macro. + * So we don't use ASSIGN_RAY_STATE macro. */ kernel_split_state.ray_state[ray_index] = RAY_ACTIVE; diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index de4e77ffc24..cfc1041da19 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -282,7 +282,7 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, m_wintab.maxAzimuth = Orientation[0].axMax; m_wintab.maxAltitude = Orientation[1].axMax; } - else { /* no so dont do tilt stuff */ + else { /* No so don't do tilt stuff. */ m_wintab.maxAzimuth = m_wintab.maxAltitude = 0; } } @@ -1057,7 +1057,7 @@ void GHOST_WindowWin32::processWin32TabletInitEvent() m_wintab.maxAzimuth = Orientation[0].axMax; m_wintab.maxAltitude = Orientation[1].axMax; } - else { /* no so dont do tilt stuff */ + else { /* No so don't do tilt stuff. */ m_wintab.maxAzimuth = m_wintab.maxAltitude = 0; } } diff --git a/intern/guardedalloc/MEM_guardedalloc.h b/intern/guardedalloc/MEM_guardedalloc.h index 62f28c9e97e..df5593ba484 100644 --- a/intern/guardedalloc/MEM_guardedalloc.h +++ b/intern/guardedalloc/MEM_guardedalloc.h @@ -51,7 +51,7 @@ #include /* needed for FILE* */ -/* needed for uintptr_t and attributes, exception, dont use BLI anywhere else in MEM_* */ +/* Needed for uintptr_t and attributes, exception, don't use BLI anywhere else in `MEM_*` */ #include "../../source/blender/blenlib/BLI_compiler_attrs.h" #include "../../source/blender/blenlib/BLI_sys_types.h" diff --git a/source/blender/blenkernel/intern/DerivedMesh.cc b/source/blender/blenkernel/intern/DerivedMesh.cc index 4aa7cfae009..9f51ef5292f 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.cc +++ b/source/blender/blenkernel/intern/DerivedMesh.cc @@ -359,7 +359,7 @@ void DM_init(DerivedMesh *dm, dm->needsFree = 1; dm->dirty = (DMDirtyFlag)0; - /* don't use CustomData_reset(...); because we dont want to touch customdata */ + /* Don't use CustomData_reset(...); because we don't want to touch custom-data. */ copy_vn_i(dm->vertData.typemap, CD_NUMTYPES, -1); copy_vn_i(dm->edgeData.typemap, CD_NUMTYPES, -1); copy_vn_i(dm->faceData.typemap, CD_NUMTYPES, -1); diff --git a/source/blender/blenkernel/intern/editmesh_tangent.c b/source/blender/blenkernel/intern/editmesh_tangent.c index 9656c20f0be..d849f4ab37d 100644 --- a/source/blender/blenkernel/intern/editmesh_tangent.c +++ b/source/blender/blenkernel/intern/editmesh_tangent.c @@ -341,7 +341,7 @@ void BKE_editmesh_loop_tangent_calc(BMEditMesh *em, /* map faces to quads */ if (em->tottri != bm->totface) { - /* over alloc, since we dont know how many ngon or quads we have */ + /* Over allocate, since we don't know how many ngon or quads we have. */ /* map fake face index to looptri */ face_as_quad_map = MEM_mallocN(sizeof(int) * totface, __func__); diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 7fe009d51ca..4c85fda4a37 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -2310,7 +2310,7 @@ static void adaptive_domain_adjust( z - fds->res_min[2]); max_den = (fuel) ? MAX2(density[index], fuel[index]) : density[index]; - /* check high resolution bounds if max density isnt already high enough */ + /* Check high resolution bounds if max density isn't already high enough. */ if (max_den < fds->adapt_threshold && fds->flags & FLUID_DOMAIN_USE_NOISE && fds->fluid) { int i, j, k; /* high res grid index */ diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index e7a16463d87..ddbc7e7d1ef 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -881,7 +881,7 @@ Mesh *BKE_mesh_new_nomain( NULL, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE); BKE_libblock_init_empty(&mesh->id); - /* don't use CustomData_reset(...); because we dont want to touch customdata */ + /* Don't use CustomData_reset(...); because we don't want to touch custom-data. */ copy_vn_i(mesh->vdata.typemap, CD_NUMTYPES, -1); copy_vn_i(mesh->edata.typemap, CD_NUMTYPES, -1); copy_vn_i(mesh->fdata.typemap, CD_NUMTYPES, -1); diff --git a/source/blender/blenkernel/intern/mesh_tangent.c b/source/blender/blenkernel/intern/mesh_tangent.c index c8f15fef71a..2e22e521a13 100644 --- a/source/blender/blenkernel/intern/mesh_tangent.c +++ b/source/blender/blenkernel/intern/mesh_tangent.c @@ -635,7 +635,7 @@ void BKE_mesh_calc_loop_tangent_ex(const MVert *mvert, /* map faces to quads */ if (looptri_len != mpoly_len) { - /* over alloc, since we dont know how many ngon or quads we have */ + /* Over allocate, since we don't know how many ngon or quads we have. */ /* map fake face index to looptri */ face_as_quad_map = MEM_mallocN(sizeof(int) * looptri_len, __func__); diff --git a/source/blender/blenlib/BLI_endian_switch_inline.h b/source/blender/blenlib/BLI_endian_switch_inline.h index 70d428147e2..d42126fbe61 100644 --- a/source/blender/blenlib/BLI_endian_switch_inline.h +++ b/source/blender/blenlib/BLI_endian_switch_inline.h @@ -22,7 +22,7 @@ extern "C" { /* only include from header */ #ifndef __BLI_ENDIAN_SWITCH_H__ -# error "this file isnt to be directly included" +# error "this file isn't to be directly included" #endif /** \file diff --git a/source/blender/blenlib/BLI_link_utils.h b/source/blender/blenlib/BLI_link_utils.h index a877860cd8d..e1e4a8dbd4a 100644 --- a/source/blender/blenlib/BLI_link_utils.h +++ b/source/blender/blenlib/BLI_link_utils.h @@ -21,7 +21,7 @@ * \brief Single link-list utility macros. (header only api). * * Use this api when the structure defines its own ``next`` pointer - * and a double linked list such as #ListBase isnt needed. + * and a double linked list such as #ListBase isn't needed. */ #define BLI_LINKS_PREPEND(list, link) \ diff --git a/source/blender/blenlib/intern/BLI_memiter.c b/source/blender/blenlib/intern/BLI_memiter.c index 428dd1e2ad8..3f255ce0e16 100644 --- a/source/blender/blenlib/intern/BLI_memiter.c +++ b/source/blender/blenlib/intern/BLI_memiter.c @@ -58,7 +58,7 @@ typedef intptr_t offset_t; * typically we rely on the 'count' to avoid iterating past the end. */ // #define USE_TERMINATE_PARANOID -/* Currently totalloc isnt used. */ +/* Currently totalloc isn't used. */ // #define USE_TOTALLOC /* pad must be power of two */ diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c index e5868abbe2c..75f934c1fb8 100644 --- a/source/blender/blenlib/intern/BLI_mempool.c +++ b/source/blender/blenlib/intern/BLI_mempool.c @@ -76,7 +76,7 @@ */ #define USEDWORD MAKE_ID('u', 's', 'e', 'd') -/* currently totalloc isnt used */ +/* Currently totalloc isn't used. */ // #define USE_TOTALLOC /* optimize pool size */ diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index cc1d6df10f5..b694f9c7fc0 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -1289,7 +1289,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info, BLI_assert(i_prev <= data_len); for (size_t i = i_prev; i < data_len;) { - /* Assumes exiting chunk isnt a match! */ + /* Assumes exiting chunk isn't a match! */ const BChunkRef *cref_found = table_lookup( info, table, table_len, i_table_start, data, data_len, i, table_hash_array); @@ -1317,7 +1317,7 @@ static BChunkList *bchunk_list_from_data_merge(const BArrayInfo *info, BChunk *chunk_found = cref_found->link; if (bchunk_data_compare(chunk_found, data, data_len, i_prev)) { - /* may be useful to remove table data, assuming we dont have + /* May be useful to remove table data, assuming we don't have * repeating memory where it would be useful to re-use chunks. */ i += chunk_found->data_len; bchunk_list_append(info, bs_mem, chunk_list, chunk_found); diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c index 17ee0eecc6b..57302f1ff81 100644 --- a/source/blender/blenlib/intern/array_utils.c +++ b/source/blender/blenlib/intern/array_utils.c @@ -193,7 +193,7 @@ void _bli_array_binary_or( * \param span_step: Indices to iterate over, * initialize both values to the array length to initialize iteration. * \param r_span_len: The length of the span, useful when \a use_wrap is enabled, - * where calculating the length isnt a simple subtraction. + * where calculating the length isn't a simple subtraction. */ bool _bli_array_iter_span(const void *arr, unsigned int arr_len, diff --git a/source/blender/blenlib/intern/math_solvers.c b/source/blender/blenlib/intern/math_solvers.c index 85900dc32a6..131afc19f28 100644 --- a/source/blender/blenlib/intern/math_solvers.c +++ b/source/blender/blenlib/intern/math_solvers.c @@ -167,7 +167,7 @@ bool BLI_tridiagonal_solve_cyclic( return false; } - /* prepare the noncyclic system; relies on tridiagonal_solve ignoring values */ + /* Prepare the non-cyclic system; relies on tridiagonal_solve ignoring values. */ memcpy(b2, b, bytes); b2[0] -= a0; b2[count - 1] -= cN; diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c index 6857a1f3929..288c5fa8158 100644 --- a/source/blender/bmesh/intern/bmesh_interp.c +++ b/source/blender/bmesh/intern/bmesh_interp.c @@ -939,7 +939,7 @@ void BM_data_layer_free(BMesh *bm, CustomData *data, int type) data->pool = NULL; has_layer = CustomData_free_layer_active(data, type, 0); - /* assert because its expensive to realloc - better not do if layer isnt present */ + /* Assert because its expensive to realloc - better not do if layer isn't present. */ BLI_assert(has_layer != false); UNUSED_VARS_NDEBUG(has_layer); @@ -961,7 +961,7 @@ void BM_data_layer_free_n(BMesh *bm, CustomData *data, int type, int n) data->pool = NULL; has_layer = CustomData_free_layer(data, type, 0, CustomData_get_layer_index_n(data, type, n)); - /* assert because its expensive to realloc - better not do if layer isnt present */ + /* Assert because its expensive to realloc - better not do if layer isn't present. */ BLI_assert(has_layer != false); UNUSED_VARS_NDEBUG(has_layer); diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c index c81d4f9b67c..ff6274cff12 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.c +++ b/source/blender/bmesh/intern/bmesh_iterators.c @@ -158,7 +158,7 @@ int BMO_iter_as_array(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], /** * \brief Iterator as Array * - * Allocates a new array, has the advantage that you dont need to know the size ahead of time. + * Allocates a new array, has the advantage that you don't need to know the size ahead of time. * * Takes advantage of less common iterator usage to avoid counting twice, * which you might end up doing when #BM_iter_as_array is used. @@ -410,7 +410,7 @@ int BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, const */ /* see bug T36923 for why we need this, - * allow adding but not removing, this isnt _totally_ safe since + * allow adding but not removing, this isn't _totally_ safe since * you could add/remove within the same loop, but catches common cases */ #ifdef DEBUG diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index b52c26a65f0..0f0427373d9 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -58,7 +58,7 @@ static int bm_face_connect_verts(BMesh *bm, BMFace *f, const bool check_degenera l_iter = l_first = BM_FACE_FIRST_LOOP(f); do { if (BMO_vert_flag_test(bm, l_iter->v, VERT_INPUT) && - /* ensure this vertex isnt part of a contiguous group */ + /* Ensure this vertex isn't part of a contiguous group. */ ((BMO_vert_flag_test(bm, l_iter->prev->v, VERT_INPUT) == 0) || (BMO_vert_flag_test(bm, l_iter->next->v, VERT_INPUT) == 0))) { if (!l_tag_prev) { diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c index df15778558b..bb07a247a4e 100644 --- a/source/blender/bmesh/operators/bmo_fill_grid.c +++ b/source/blender/bmesh/operators/bmo_fill_grid.c @@ -586,8 +586,8 @@ static bool bm_edge_test_cb(BMEdge *e, void *bm_v) static bool bm_edge_test_rail_cb(BMEdge *e, void *UNUSED(bm_v)) { - /* normally operators dont check for hidden state - * but alternative would be to pass slot of rail edges */ + /* Normally operators don't check for hidden state + * but alternative would be to pass slot of rail edges. */ if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) { return false; } diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index 361b10520da..8cc0bfadbda 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -599,7 +599,7 @@ void bmo_collapse_uvs_exec(BMesh *bm, BMOperator *op) const short oflag = EDGE_MARK; int i; - /* check flags dont change once set */ + /* Check flags don't change once set. */ #ifndef NDEBUG int tot_test; #endif diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index be996e6ffe4..883420e59f6 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -1344,7 +1344,7 @@ void BM_mesh_esubdivide(BMesh *bm, { BMOperator op; - /* use_sphere isnt exposed here since its only used for new primitives */ + /* `use_sphere` isn't exposed here since its only used for new primitives. */ BMO_op_initf(bm, &op, BMO_FLAG_DEFAULTS, diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c index d72960adf89..38a27b811b0 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c @@ -932,7 +932,7 @@ static void bm_edgering_pair_order(BMesh *bm, BLI_assert(bm_edgering_pair_order_is_flipped(bm, el_store_a, el_store_b) == false); } else { - /* if we dont share and edge - flip */ + /* If we don't share and edge - flip. */ BMEdge *e = BM_edge_exists(((LinkData *)lb_a->first)->data, ((LinkData *)lb_b->first)->data); if (e == NULL || !BMO_edge_flag_test(bm, e, EDGE_RING)) { BM_edgeloop_flip(bm, el_store_b); diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 92ca8e38737..869856d0c5b 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -939,7 +939,7 @@ static bool bm_edge_collapse_is_degenerate_topology(BMEdge *e_first) * intended for speed over flexibility. * can only collapse edges connected to (1, 2) tris. * - * Important - dont add vert/edge/face data on collapsing! + * Important - don't add vert/edge/face data on collapsing! * * \param r_e_clear_other: Let caller know what edges we remove besides \a e_clear * \param customdata_flag: Merge factor, scales from 0 - 1 ('v_clear' -> 'v_other') @@ -1394,7 +1394,7 @@ void BM_mesh_decimate_collapse(BMesh *bm, * \note * - `eheap_table[e_index_mirr]` is only removed from the heap at the last moment * since its possible (in theory) for collapsing `e` to remove `e_mirr`. - * - edges sharing a vertex are ignored, so the pivot vertex isnt moved to one side. + * - edges sharing a vertex are ignored, so the pivot vertex isn't moved to one side. */ BMEdge *e = BLI_heap_pop_min(eheap); diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c index 2254b46f860..4a024f745ed 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c @@ -401,7 +401,7 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, earray[i] = e_iter; } /* Remove all edges/verts left behind from dissolving, - * NULL'ing the vertex array so we dont re-use. */ + * NULL'ing the vertex array so we don't re-use. */ for (i = bm->totedge - 1; i != -1; i--) { e_iter = earray[i]; diff --git a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c index e2741b806c2..0a512fdd592 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c +++ b/source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c @@ -77,12 +77,12 @@ static bool bm_vert_dissolve_fan_test(BMVert *v) static bool bm_vert_dissolve_fan(BMesh *bm, BMVert *v) { - /* collapse under 2 conditions. + /* Collapse under 2 conditions: * - vert connects to 4 manifold edges (and 4 faces). * - vert connects to 1 manifold edge, 2 boundary edges (and 2 faces). * * This covers boundary verts of a quad grid and center verts. - * note that surrounding faces dont have to be quads. + * note that surrounding faces don't have to be quads. */ BMIter iter; diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h index a42719aaf09..a05ba531bc2 100644 --- a/source/blender/compositor/COM_defines.h +++ b/source/blender/compositor/COM_defines.h @@ -94,7 +94,7 @@ typedef enum OrderOfChunks { COM_TO_RANDOM = 1, /** \brief no ordering */ COM_TO_TOP_DOWN = 2, - /** \brief experimental ordering with 9 hotspots */ + /** \brief experimental ordering with 9 hot-spots. */ COM_TO_RULE_OF_THIRDS = 3, } OrderOfChunks; diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cc b/source/blender/compositor/intern/COM_WorkScheduler.cc index f19c54991cd..71f062ed5bf 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.cc +++ b/source/blender/compositor/intern/COM_WorkScheduler.cc @@ -35,7 +35,7 @@ #include "BKE_global.h" #if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD -# ifndef DEBUG /* test this so we dont get warnings in debug builds */ +# ifndef DEBUG /* Test this so we don't get warnings in debug builds. */ # warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging. # endif #elif COM_CURRENT_THREADING_MODEL == COM_TM_QUEUE diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc index 934b7e51aee..4b8e1aa0d1b 100644 --- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc +++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cc @@ -21,7 +21,7 @@ inline float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float gain) { - /* 1:1 match with the sequencer with linear/srgb conversions, the conversion isnt pretty + /* 1:1 match with the sequencer with linear/srgb conversions, the conversion isn't pretty * but best keep it this way, since testing for durian shows a similar calculation * without lin/srgb conversions gives bad results (over-saturated shadows) with colors * slightly below 1.0. some correction can be done but it ends up looking bad for shadows or diff --git a/source/blender/datatoc/datatoc.c b/source/blender/datatoc/datatoc.c index f68d2f8ce13..62b4cee4af0 100644 --- a/source/blender/datatoc/datatoc.c +++ b/source/blender/datatoc/datatoc.c @@ -112,7 +112,7 @@ int main(int argc, char **argv) fprintf(fpout, "%3d,", getc(fpin)); } - /* trailing NULL terminator, this isnt needed in some cases and + /* Trailing NULL terminator, this isn't needed in some cases and * won't be taken into account by the size variable, but its useful when dealing with * NULL terminated string data */ fprintf(fpout, "0\n};\n\n"); diff --git a/source/blender/draw/engines/overlay/overlay_image.c b/source/blender/draw/engines/overlay/overlay_image.c index 844a0eb8351..ada07499d1c 100644 --- a/source/blender/draw/engines/overlay/overlay_image.c +++ b/source/blender/draw/engines/overlay/overlay_image.c @@ -164,7 +164,7 @@ static struct GPUTexture *image_camera_background_texture_get(CameraBGImage *bgp BKE_image_user_frame_calc(image, iuser, ctime); if (image->source == IMA_SRC_SEQUENCE && !(iuser->flag & IMA_USER_FRAME_IN_RANGE)) { - /* Frame is out of range, dont show. */ + /* Frame is out of range, don't show. */ return NULL; } diff --git a/source/blender/draw/engines/overlay/shaders/antialiasing_frag.glsl b/source/blender/draw/engines/overlay/shaders/antialiasing_frag.glsl index f24aee56bb2..c204949cc45 100644 --- a/source/blender/draw/engines/overlay/shaders/antialiasing_frag.glsl +++ b/source/blender/draw/engines/overlay/shaders/antialiasing_frag.glsl @@ -134,7 +134,8 @@ void main() fragColor *= line_coverage(dist, line_kernel); } - /* We dont order fragments but use alpha over/alpha under based on current minimum frag depth. */ + /* We don't order fragments but use alpha over/alpha under based on current minimum frag depth. + */ neighbor_blend(coverage.x, depths.x, neightbor_col0, depth, fragColor); neighbor_blend(coverage.y, depths.y, neightbor_col1, depth, fragColor); neighbor_blend(coverage.z, depths.z, neightbor_col2, depth, fragColor); diff --git a/source/blender/draw/engines/overlay/shaders/armature_stick_vert.glsl b/source/blender/draw/engines/overlay/shaders/armature_stick_vert.glsl index 99bdbfea2be..0a2598fb6b7 100644 --- a/source/blender/draw/engines/overlay/shaders/armature_stick_vert.glsl +++ b/source/blender/draw/engines/overlay/shaders/armature_stick_vert.glsl @@ -15,10 +15,10 @@ in uint flag; /* ---- Per instance Attrs ---- */ in vec3 boneStart; in vec3 boneEnd; -in vec4 wireColor; /* alpha encode if we do wire. If 0.0 we dont. */ -in vec4 boneColor; /* alpha encode if we do bone. If 0.0 we dont. */ -in vec4 headColor; /* alpha encode if we do head. If 0.0 we dont. */ -in vec4 tailColor; /* alpha encode if we do tail. If 0.0 we dont. */ +in vec4 wireColor; /* alpha encode if we do wire. If 0.0 we don't. */ +in vec4 boneColor; /* alpha encode if we do bone. If 0.0 we don't. */ +in vec4 headColor; /* alpha encode if we do head. If 0.0 we don't. */ +in vec4 tailColor; /* alpha encode if we do tail. If 0.0 we don't. */ #define do_wire (wireColor.a > 0.0) #define is_head bool(flag & POS_HEAD) diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index bd5b61b26e9..0d7f2e67598 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -68,7 +68,7 @@ void workbench_engine_init(void *ved) wpd->object_id_tx = DRW_texture_pool_query_fullscreen(GPU_R16UI, &draw_engine_workbench); } else { - /* Dont free because it's a pool texture. */ + /* Don't free because it's a pool texture. */ wpd->object_id_tx = NULL; } diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 132b5274517..d3a90ccfbd0 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -279,7 +279,7 @@ DRWView *DRW_view_create_with_zoffset(const DRWView *parent_view, float viewdist = rv3d->dist; - /* special exception for ortho camera (viewdist isnt used for perspective cameras) */ + /* special exception for ortho camera (`viewdist` isn't used for perspective cameras). */ if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) { viewdist = 1.0f / max_ff(fabsf(winmat[0][0]), fabsf(winmat[1][1])); } diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 244b0133e64..2655319bbd4 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -3092,7 +3092,7 @@ void DRW_opengl_context_destroy(void) void DRW_opengl_context_enable_ex(bool UNUSED(restore)) { if (DST.gl_context != NULL) { - /* IMPORTANT: We dont support immediate mode in render mode! + /* IMPORTANT: We don't support immediate mode in render mode! * This shall remain in effect until immediate mode supports * multiple threads. */ BLI_ticket_mutex_lock(DST.gl_context_mutex); diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index 889041daacf..48a36ff276d 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -650,7 +650,7 @@ static void curve_draw_exec_precalc(wmOperator *op) prop = RNA_struct_find_property(op->ptr, "error_threshold"); if (!RNA_property_is_set(op->ptr, prop)) { - /* error isnt set so we'll have to calculate it from the pixel values */ + /* Error isn't set so we'll have to calculate it from the pixel values. */ BLI_mempool_iter iter; const struct StrokeElem *selem, *selem_prev; diff --git a/source/blender/editors/include/ED_transverts.h b/source/blender/editors/include/ED_transverts.h index bff31149b75..28955da6ef1 100644 --- a/source/blender/editors/include/ED_transverts.h +++ b/source/blender/editors/include/ED_transverts.h @@ -50,9 +50,12 @@ bool ED_transverts_poll(struct bContext *C); /* currently only used for bmesh index values */ enum { - TM_INDEX_ON = 1, /* tag to make trans verts */ - TM_INDEX_OFF = 0, /* don't make verts */ - TM_INDEX_SKIP = -1, /* dont make verts (when the index values point to trans-verts) */ + /** Tag to make trans verts. */ + TM_INDEX_ON = 1, + /** Don't make verts. */ + TM_INDEX_OFF = 0, + /** Don't make verts (when the index values point to trans-verts). */ + TM_INDEX_SKIP = -1, }; /* mode flags: */ diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index c7f5385eac3..fbd7dcd61f2 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -4162,7 +4162,7 @@ static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *bu RNA_property_enum_items_gettexted( block->evil_C, &but->rnapoin, but->rnaprop, &item_array, NULL, &free); - /* we dont want nested rows, cols in menus */ + /* We don't want nested rows, cols in menus. */ UI_block_layout_set_current(block, layout); int totitems = 0; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 81da54ade9e..ee5c3f53f5e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2097,7 +2097,7 @@ static void ui_apply_but( } } if (data->select_others.elems_len == 0) { - /* dont check again */ + /* Don't check again. */ data->select_others.elems_len = -1; } #endif @@ -4894,7 +4894,7 @@ static bool ui_numedit_but_NUM(uiButNumber *number_but, else { /* only scale large int buttons */ non_linear_range_limit = 129.0f; - /* larger for ints, we dont need to fine tune them */ + /* Larger for ints, we don't need to fine tune them. */ non_linear_pixel_map = 250.0f; /* prevent large ranges from getting too out of control */ @@ -7779,7 +7779,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * else if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { /* --> (BUTTON_MULTI_INIT_ENABLE) */ const float margin_x = DRAG_MULTINUM_THRESHOLD_DRAG_X / sqrtf(block->aspect); - /* check if we're dont setting buttons */ + /* Check if we're don't setting buttons. */ if ((data->str && ELEM(data->state, BUTTON_STATE_TEXT_EDITING, BUTTON_STATE_NUM_EDITING)) || ((abs(data->multi_data.drag_lock_x - event->x) > margin_x) && diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 8f90dc7f801..4430d00f2e3 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -813,7 +813,7 @@ static void ui_item_enum_expand_exec(uiLayout *layout, RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item_array, NULL, &free); } - /* we dont want nested rows, cols in menus */ + /* We don't want nested rows, cols in menus. */ uiLayout *layout_radial = NULL; if (radial) { if (layout->root->layout == layout) { diff --git a/source/blender/editors/interface/interface_region_tooltip.c b/source/blender/editors/interface/interface_region_tooltip.c index 050a14cf574..244cf7622e0 100644 --- a/source/blender/editors/interface/interface_region_tooltip.c +++ b/source/blender/editors/interface/interface_region_tooltip.c @@ -240,7 +240,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *region fstyle_mono.uifont_id = blf_mono_font; UI_fontstyle_set(&fstyle_mono); - /* XXX, needed because we dont have mono in 'U.uifonts' */ + /* XXX, needed because we don't have mono in 'U.uifonts' */ BLF_size(fstyle_mono.uifont_id, fstyle_mono.points * U.pixelsize, U.dpi); rgb_float_to_uchar(drawcol, tip_colors[field->format.color_id]); UI_fontstyle_draw(&fstyle_mono, &bbox, field->text, drawcol, &fs_params); diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 08895564a26..42b6e771fe4 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -2083,11 +2083,11 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_ UI_panels_free_instanced(C, region); bConstraint *con = (constraints == NULL) ? NULL : constraints->first; for (int i = 0; con; i++, con = con->next) { - /* Dont show invalid/legacy constraints. */ + /* Don't show invalid/legacy constraints. */ if (con->type == CONSTRAINT_TYPE_NULL) { continue; } - /* Dont show temporary constraints (AutoIK and targetless IK constraints). */ + /* Don't show temporary constraints (AutoIK and target-less IK constraints). */ if (con->type == CONSTRAINT_TYPE_KINEMATIC) { bKinematicConstraint *data = con->data; if (data->flag & CONSTRAINT_IK_TEMP) { @@ -2116,11 +2116,11 @@ void uiTemplateConstraints(uiLayout *UNUSED(layout), bContext *C, bool use_bone_ /* Assuming there's only one group of instanced panels, update the custom data pointers. */ Panel *panel = region->panels.first; LISTBASE_FOREACH (bConstraint *, con, constraints) { - /* Dont show invalid/legacy constraints. */ + /* Don't show invalid/legacy constraints. */ if (con->type == CONSTRAINT_TYPE_NULL) { continue; } - /* Dont show temporary constraints (AutoIK and targetless IK constraints). */ + /* Don't show temporary constraints (AutoIK and target-less IK constraints). */ if (con->type == CONSTRAINT_TYPE_KINEMATIC) { bKinematicConstraint *data = con->data; if (data->flag & CONSTRAINT_IK_TEMP) { diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 14f81520b9a..1a6ac8597ae 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1475,8 +1475,8 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op)) spline = next_spline; } - /* not essential but confuses users when there are keys with no data! - * assume if they delete all data from the layer they also dont care about keys */ + /* Not essential but confuses users when there are keys with no data! + * Assume if they delete all data from the layer they also don't care about keys. */ if (BLI_listbase_is_empty(&mask_layer->splines)) { BKE_mask_layer_free_shapes(mask_layer); } diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index b5ec3f388a0..df0ca6e3cae 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2548,7 +2548,7 @@ static void knifetool_finish_ex(KnifeTool_OpData *kcd) EDBM_mesh_normals_update(kcd->em); EDBM_update_generic(kcd->ob->data, true, true); - /* re-tessellating makes this invalid, dont use again by accident */ + /* Re-tessellating makes this invalid, don't use again by accident. */ knifetool_free_bmbvh(kcd); } static void knifetool_finish(wmOperator *op) diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 33797573f2b..222d44f85d8 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -386,7 +386,7 @@ static void edbm_ripsel_deselect_helper(BMesh *bm, * use for rebuilding face-fill * * \note the method currently used fails for edges with 3+ face users and gives - * nasty holes in the mesh, there isnt a good way of knowing ahead of time + * nasty holes in the mesh, there isn't a good way of knowing ahead of time * which loops will be split apart (its possible to figure out but quite involved). * So for now this is a known limitation of current rip-fill option. */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 8bb557509e0..ade21f58232 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -853,7 +853,7 @@ static BMElem *edbm_add_edge_face_exec__tricky_extend_sel(BMesh *bm) } static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_desel, BMFace *f) { - /* now we need to find the edge that isnt connected to this element */ + /* Now we need to find the edge that isn't connected to this element. */ BM_select_history_clear(bm); /* Notes on hidden geometry: @@ -896,7 +896,7 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) { - /* when this is used to dissolve we could avoid this, but checking isnt too slow */ + /* When this is used to dissolve we could avoid this, but checking isn't too slow. */ bool changed_multi = false; ViewLayer *view_layer = CTX_data_view_layer(C); uint objects_len = 0; @@ -4815,11 +4815,11 @@ static bool edbm_fill_grid_prepare(BMesh *bm, int offset, int *span_p, const boo if (span_calc) { /* calculate the span by finding the next corner in 'verts' - * we dont know what defines a corner exactly so find the 4 verts + * we don't know what defines a corner exactly so find the 4 verts * in the loop with the greatest angle. * Tag them and use the first tagged vertex to calculate the span. * - * note: we may have already checked 'edbm_fill_grid_vert_tag_angle()' on each + * NOTE: we may have already checked 'edbm_fill_grid_vert_tag_angle()' on each * vert, but advantage of de-duplicating is minimal. */ struct SortPtrByFloat *ele_sort = MEM_mallocN(sizeof(*ele_sort) * verts_len, __func__); LinkData *v_link; diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index d64769567f7..f651f5bc3fd 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -156,8 +156,10 @@ static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) return OPERATOR_PASS_THROUGH; } -/* for exec() when there is no render job - * note: this wont check for the escape key being pressed, but doing so isnt threadsafe */ +/** + * for exec() when there is no render job + * note: this wont check for the escape key being pressed, but doing so isn't thread-safe. + */ static int bake_break(void *UNUSED(rjv)) { if (G.is_break) { diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 1ee17d0e4b0..0ec8238f741 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4731,7 +4731,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) (dx != 0 || dy != 0)) || bedit->first) { PEData data = bedit->data; - data.context = C; /* TODO(mai): why isnt this set in bedit->data? */ + data.context = C; /* TODO(mai): why isn't this set in bedit->data? */ view3d_operator_needs_opengl(C); selected = (short)count_selected_keys(scene, edit); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 1f59e361526..0b5a8db0115 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -788,8 +788,10 @@ static int render_breakjob(void *rjv) return 0; } -/* for exec() when there is no render job - * note: this wont check for the escape key being pressed, but doing so isnt threadsafe */ +/** + * For exec() when there is no render job + * note: this wont check for the escape key being pressed, but doing so isn't thread-safe. + */ static int render_break(void *UNUSED(rjv)) { if (G.is_break) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index f7c0f7718bb..530689ce049 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -1733,7 +1733,7 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps, ps->mvert_eval[lt_vtri[1]].co, ps->mvert_eval[lt_vtri[2]].co); #else - /* don't use because some modifiers dont have normal data (subsurf for eg) */ + /* Don't use because some modifiers don't have normal data (subsurf for eg). */ copy_v3_v3(no, (float *)ps->dm->getTessFaceData(ps->dm, tri_index, CD_NORMAL)); #endif } diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index f135c1ee726..c141789f171 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -217,7 +217,7 @@ static int file_browse_exec(bContext *C, wmOperator *op) BLI_path_abs(path, id ? ID_BLEND_PATH(bmain, id) : BKE_main_blendfile_path(bmain)); if (BLI_is_dir(path)) { - /* Do this first so '//' isnt converted to '//\' on windows. */ + /* Do this first so '//' isn't converted to '//\' on windows. */ BLI_path_slash_ensure(path); if (is_relative) { BLI_strncpy(path, str, FILE_MAX); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index bd6b15bdf74..856bd5b1bc3 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -452,7 +452,7 @@ static int file_box_select_modal(bContext *C, wmOperator *op, const wmEvent *eve for (idx = sel.last; idx >= 0; idx--) { const FileDirEntry *file = filelist_file(sfile->files, idx); - /* dont highlight readonly file (".." or ".") on box select */ + /* Don't highlight read-only file (".." or ".") on box select. */ if (FILENAME_IS_CURRPAR(file->relpath)) { filelist_entry_select_set( sfile->files, file, FILE_SEL_REMOVE, FILE_SEL_HIGHLIGHTED, CHECK_ALL); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 7015ca970a3..038b9c11bca 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -639,7 +639,7 @@ int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *region) * * - *_item: size of each (row|col), (including padding) * - *_view: (x|y) size of the view. - * - *_over: extra pixels, to take into account, when the fit isnt exact + * - *_over: extra pixels, to take into account, when the fit isn't exact * (needed since you may see the end of the previous column and the beginning of the next). * * Could be more clever and take scrolling into account, diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 883556948e2..8b8034124d9 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -923,12 +923,12 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b hlstart = (lhlstart * pix_available) / ltexth; hlend = (lhlend * pix_available) / ltexth; - /* the scrollbar is non-linear sized */ + /* The scrollbar is non-linear sized. */ if (pix_bardiff > 0) { /* the start of the highlight is in the current viewport */ if (st->runtime.viewlines && lhlstart >= st->top && lhlstart <= st->top + st->runtime.viewlines) { - /* speed the progresion of the start of the highlight through the scrollbar */ + /* Speed the progression of the start of the highlight through the scrollbar. */ hlstart = (((pix_available - pix_bardiff) * lhlstart) / ltexth) + (pix_bardiff * (lhlstart - st->top) / st->runtime.viewlines); } @@ -949,7 +949,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *region, rcti *scroll, rcti *b /* the end of the highlight is in the current viewport */ if (st->runtime.viewlines && lhlend >= st->top && lhlend <= st->top + st->runtime.viewlines) { - /* speed the progresion of the end of the highlight through the scrollbar */ + /* Speed the progression of the end of the highlight through the scrollbar. */ hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->runtime.viewlines); } @@ -1433,7 +1433,7 @@ static void draw_brackets(const SpaceText *st, const TextDrawContext *tdc, ARegi find = -b; stack = 0; - /* Don't highlight backets if syntax HL is off or bracket in string or comment. */ + /* Don't highlight brackets if syntax HL is off or bracket in string or comment. */ if (!linep->format || linep->format[fc] == FMT_TYPE_STRING || linep->format[fc] == FMT_TYPE_COMMENT) { return; diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c index 91e629147f4..bdb2c3874db 100644 --- a/source/blender/editors/space_view3d/view3d_iterators.c +++ b/source/blender/editors/space_view3d/view3d_iterators.c @@ -571,7 +571,7 @@ void armature_foreachScreenBone(struct ViewContext *vc, } else { screen_co_a[0] = IS_CLIPPED; /* weak */ - /* screen_co_a[1]: intentionally dont set this so we get errors on misuse */ + /* screen_co_a[1]: intentionally don't set this so we get errors on misuse */ } /* project tail location to screenspace */ @@ -581,7 +581,7 @@ void armature_foreachScreenBone(struct ViewContext *vc, } else { screen_co_b[0] = IS_CLIPPED; /* weak */ - /* screen_co_b[1]: intentionally dont set this so we get errors on misuse */ + /* screen_co_b[1]: intentionally don't set this so we get errors on misuse */ } if (points_proj_tot) { /* at least one point's projection worked */ @@ -623,7 +623,7 @@ void pose_foreachScreenBone(struct ViewContext *vc, } else { screen_co_a[0] = IS_CLIPPED; /* weak */ - /* screen_co_a[1]: intentionally dont set this so we get errors on misuse */ + /* screen_co_a[1]: intentionally don't set this so we get errors on misuse */ } /* project tail location to screenspace */ @@ -633,7 +633,7 @@ void pose_foreachScreenBone(struct ViewContext *vc, } else { screen_co_b[0] = IS_CLIPPED; /* weak */ - /* screen_co_b[1]: intentionally dont set this so we get errors on misuse */ + /* screen_co_b[1]: intentionally don't set this so we get errors on misuse */ } if (points_proj_tot) { /* at least one point's projection worked */ diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 3ef428cfbaf..e3acda9bffb 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -228,7 +228,7 @@ void ED_view3d_polygon_offset(const RegionView3D *rv3d, const float dist) float viewdist = rv3d->dist; - /* special exception for ortho camera (viewdist isnt used for perspective cameras) */ + /* Special exception for orthographic camera (`viewdist` isn't used for perspective cameras). */ if (dist != 0.0f) { if (rv3d->persp == RV3D_CAMOB) { if (rv3d->is_persp == false) { diff --git a/source/blender/editors/transform/transform_convert_mask.c b/source/blender/editors/transform/transform_convert_mask.c index d60d34d2c5d..45dc6df4fde 100644 --- a/source/blender/editors/transform/transform_convert_mask.c +++ b/source/blender/editors/transform/transform_convert_mask.c @@ -480,7 +480,7 @@ void special_aftertrans_update__mask(bContext *C, TransInfo *t) } } - /* TODO - dont key all masks... */ + /* TODO: don't key all masks. */ if (IS_AUTOKEY_ON(t->scene)) { Scene *scene = t->scene; diff --git a/source/blender/editors/transform/transform_convert_node.c b/source/blender/editors/transform/transform_convert_node.c index 506e8a2bd9b..12c4d0816ae 100644 --- a/source/blender/editors/transform/transform_convert_node.c +++ b/source/blender/editors/transform/transform_convert_node.c @@ -115,7 +115,7 @@ void createTransNodeData(TransInfo *t) return; } - /* nodes dont support PET and probably never will */ + /* Nodes don't support PET and probably never will. */ t->flag &= ~T_PROP_EDIT_ALL; /* set transform flags on nodes */ diff --git a/source/blender/editors/transform/transform_mode_bend.c b/source/blender/editors/transform/transform_mode_bend.c index 038f7d48c66..b3b1860f9ec 100644 --- a/source/blender/editors/transform/transform_mode_bend.c +++ b/source/blender/editors/transform/transform_mode_bend.c @@ -97,7 +97,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2])) snapGrid(t, angle_rad); #else /* hrmf, snapping radius is using 'angle' steps, need to convert to something else - * this isnt essential but nicer to give reasonable snapping values for radius */ + * this isn't essential but nicer to give reasonable snapping values for radius. */ if (t->tsnap.mode & SCE_SNAP_MODE_INCREMENT) { const float radius_snap = 0.1f; const float snap_hack = (t->snap[0] * data->warp_init_dist) / radius_snap; diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index dff9ded6b29..16c1c05a6f8 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -944,7 +944,7 @@ static EdgeSlideData *createEdgeSlideVerts_single_side(TransInfo *t, TransDataCo /* over alloc */ sv_array = MEM_callocN(sizeof(TransDataEdgeSlideVert) * bm->totvertsel, "sv_array"); - /* same loop for all loops, weak but we dont connect loops in this case */ + /* Same loop for all loops, weak but we don't connect loops in this case. */ loop_nr = 1; sv_table = MEM_mallocN(sizeof(*sv_table) * bm->totvert, __func__); diff --git a/source/blender/editors/transform/transform_mode_timetranslate.c b/source/blender/editors/transform/transform_mode_timetranslate.c index adebc19c2b9..5ad6d04b4de 100644 --- a/source/blender/editors/transform/transform_mode_timetranslate.c +++ b/source/blender/editors/transform/transform_mode_timetranslate.c @@ -97,7 +97,7 @@ static void applyTimeTranslateValue(TransInfo *t, const float deltax) /* It is assumed that td->extra is a pointer to the AnimData, * whose active action is where this keyframe comes from. * (this is only valid when not in NLA) - * (also: masks and gpencil dont have animadata) + * (also: masks and gpencil don't have animadata) */ AnimData *adt = (t->spacetype != SPACE_NLA) ? td->extra : NULL; diff --git a/source/blender/gpu/opengl/gl_debug_layer.cc b/source/blender/gpu/opengl/gl_debug_layer.cc index 7d2abfb2cff..a5225f98fd9 100644 --- a/source/blender/gpu/opengl/gl_debug_layer.cc +++ b/source/blender/gpu/opengl/gl_debug_layer.cc @@ -53,7 +53,7 @@ using GPUvoidptr = void *; namespace blender::gpu::debug { -/* List of wrapped functions. We dont have to support all of them. +/* List of wrapped functions. We don't have to support all of them. * Some functions might be declared as `extern` in GLEW. We cannot override them in this case. * Keep the list in alphabetical order. */ diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index c2337b28e54..af20a63b907 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -57,7 +57,7 @@ typedef struct EditMeshData { /** lazy initialize (when \a vertexCos is set) */ float const (*vertexNos)[3]; float const (*polyNos)[3]; - /** also lazy init but dont depend on \a vertexCos */ + /** also lazy init but don't depend on \a vertexCos */ const float (*polyCos)[3]; } EditMeshData; diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 368b1f93e4a..ca6f1467d9c 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -637,7 +637,7 @@ typedef struct DecimateModifierData { enum { MOD_DECIM_FLAG_INVERT_VGROUP = (1 << 0), - /** for collapse only. dont convert tri pairs back to quads */ + /** For collapse only. don't convert triangle pairs back to quads. */ MOD_DECIM_FLAG_TRIANGULATE = (1 << 1), /** for dissolve only. collapse all verts between 2 faces */ MOD_DECIM_FLAG_ALL_BOUNDARY_VERTS = (1 << 2), diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index acbe9da45fd..c61a39a20f0 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -402,7 +402,7 @@ typedef struct bNodeLink { #define NODE_LINK_VALID (1 << 1) #define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */ #define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */ -#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */ +#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */ /* tree->edit_quality/tree->render_quality */ #define NTREE_QUALITY_HIGH 0 diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 019823a7de3..08f52be4257 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -2093,7 +2093,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value) if (value == NULL) { CLOG_ERROR(&LOG, - "\"%s.%s\", NULL string passed (dont call in this case).", + "\"%s.%s\", NULL string passed (don't call in this case).", srna->identifier, prop->identifier); DefRNA.error = true; @@ -2102,7 +2102,7 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value) if (!value[0]) { CLOG_ERROR(&LOG, - "\"%s.%s\", empty string passed (dont call in this case).", + "\"%s.%s\", empty string passed (don't call in this case).", srna->identifier, prop->identifier); DefRNA.error = true; diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index ed1024116fb..cf7d1f30dde 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -1424,7 +1424,7 @@ static int rna_MeshPolygonStringPropertyLayer_data_length(PointerRNA *ptr) return me->totpoly; } -/* XXX, we dont have proper byte string support yet, so for now use the (bytes + 1) +/* XXX, we don't have proper byte string support yet, so for now use the (bytes + 1) * bmesh API exposes correct python/byte-string access. */ void rna_MeshStringProperty_s_get(PointerRNA *ptr, char *value) { diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index b28b8fd39fc..03db09a5aec 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -113,7 +113,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * TIMEIT_START(decim); #endif - /* set up front so we dont show invalid info in the UI */ + /* Set up front so we don't show invalid info in the UI. */ updateFaceCount(ctx, dmd, mesh->totpoly); switch (dmd->mode) { diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 7f57183ff13..3e607e88cdd 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -118,7 +118,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * { DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; - /* dont apply dynamic paint on orco mesh stack */ + /* Don't apply dynamic paint on ORCO mesh stack. */ if (!(ctx->flag & MOD_APPLY_ORCO)) { Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph); return dynamicPaint_Modifier_do(pmd, ctx->depsgraph, scene, ctx->object, mesh); diff --git a/source/blender/modifiers/intern/MOD_meshcache_pc2.c b/source/blender/modifiers/intern/MOD_meshcache_pc2.c index ea8cc334dd9..485ea6d6e32 100644 --- a/source/blender/modifiers/intern/MOD_meshcache_pc2.c +++ b/source/blender/modifiers/intern/MOD_meshcache_pc2.c @@ -75,7 +75,7 @@ static bool meshcache_read_pc2_head(FILE *fp, *err_str = "Invalid frame total"; return false; } - /* intentionally dont seek back */ + /* Intentionally don't seek back. */ return true; } diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 82e65505147..78f5b9ba2cc 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -293,7 +293,7 @@ const char *PyC_StringEnum_FindIDFromValue(const struct PyC_StringEnumItems *ite return NULL; } -/* silly function, we dont use arg. just check its compatible with __deepcopy__ */ +/* Silly function, we don't use arg. just check its compatible with `__deepcopy__`. */ int PyC_CheckArgs_DeepCopy(PyObject *args) { PyObject *dummy_pydict; diff --git a/source/blender/python/intern/bpy_gizmo_wrap.c b/source/blender/python/intern/bpy_gizmo_wrap.c index 774ad95c3eb..686a4d88266 100644 --- a/source/blender/python/intern/bpy_gizmo_wrap.c +++ b/source/blender/python/intern/bpy_gizmo_wrap.c @@ -118,7 +118,7 @@ static void gizmo_properties_init(wmGizmoType *gzt) { /* Picky developers will notice that 'bl_targets' won't work with inheritance * get direct from the dict to avoid raising a load of attribute errors - * (yes this isnt ideal) - campbell. */ + * (yes this isn't ideal) - campbell. */ PyObject *py_class_dict = py_class->tp_dict; PyObject *bl_target_properties = PyDict_GetItem(py_class_dict, bpy_intern_str_bl_target_properties); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 9f70d05cc8a..1a505b91ac5 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -727,7 +727,7 @@ enum { }; /** - * Identifying jobs by owner alone is unreliable, this isnt saved, + * Identifying jobs by owner alone is unreliable, this isn't saved, * order can change (keep 0 for 'any'). */ enum { diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 660e502a3d7..e8a41b04d84 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -561,7 +561,7 @@ char *WM_prop_pystring_assign(bContext *C, PointerRNA *ptr, PropertyRNA *prop, i char *lhs = C ? wm_prop_pystring_from_context(C, ptr, prop, index) : NULL; if (lhs == NULL) { - /* fallback to bpy.data.foo[id] if we dont find in the context */ + /* Fallback to `bpy.data.foo[id]` if we don't find in the context. */ lhs = RNA_path_full_property_py(CTX_data_main(C), ptr, prop, index); } @@ -1149,7 +1149,7 @@ int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format) { char filepath[FILE_MAX]; - /* dont NULL check prop, this can only run on ops with a 'filepath' */ + /* Don't NULL check prop, this can only run on ops with a 'filepath'. */ PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath"); RNA_property_string_get(op->ptr, prop, filepath); if (BKE_image_path_ensure_ext_from_imformat(filepath, im_format)) { diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index d75ba7865bd..25232e8e3d5 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -701,8 +701,8 @@ void wm_window_ghostwindows_ensure(wmWindowManager *wm) if (wm_init_state.size_x == 0) { wm_get_screensize(&wm_init_state.size_x, &wm_init_state.size_y); - /* note!, this isnt quite correct, active screen maybe offset 1000s if PX, - * we'd need a wm_get_screensize like function that gives offset, + /* NOTE: this isn't quite correct, active screen maybe offset 1000s if PX, + * we'd need a #wm_get_screensize like function that gives offset, * in practice the window manager will likely move to the correct monitor */ wm_init_state.start_x = 0; wm_init_state.start_y = 0; @@ -1694,7 +1694,7 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer * LISTBASE_FOREACH (wmEvent *, event, &win->event_queue) { if (event->customdata == wt) { event->customdata = NULL; - event->type = EVENT_NONE; /* timer users customdata, dont want NULL == NULL */ + event->type = EVENT_NONE; /* Timer users customdata, don't want `NULL == NULL`. */ } } }