diff options
114 files changed, 233 insertions, 224 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index e4630ad1ab5..5251dd01b29 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1552,8 +1552,8 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * button is press for menu. To prevent this we must return preventing DefWindowProc. * * Note that the four low-order bits of the wParam parameter are used internally by the - * OS. To obtain the correct result when testing the value of wParam, an application - * must combine the value 0xFFF0 with the wParam value by using the bitwise AND operator. + * OS. To obtain the correct result when testing the value of wParam, an application must + * combine the value 0xFFF0 with the wParam value by using the bit-wise AND operator. */ switch (wParam & 0xFFF0) { case SC_KEYMENU: diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index 32cc5961e4a..5be06dcc5c3 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -19,7 +19,7 @@ /** \file * \ingroup bke * - * The \link edmesh EDBM module\endlink is for editmode bmesh stuff. + * The \link edmesh EDBM module \endlink is for editmode bmesh stuff. * In contrast, this module is for code shared with blenkernel that's * only concerned with low level operations on the #BMEditMesh structure. */ diff --git a/source/blender/blenkernel/BKE_fcurve_driver.h b/source/blender/blenkernel/BKE_fcurve_driver.h index 7e4e0ad3c2a..20667c4dfba 100644 --- a/source/blender/blenkernel/BKE_fcurve_driver.h +++ b/source/blender/blenkernel/BKE_fcurve_driver.h @@ -108,7 +108,7 @@ void driver_variable_name_validate(struct DriverVar *dvar); * Ensure the driver variable's name is unique. * * Assumes the driver variable has already been assigned to the driver, so that - * the prev/next pointers can be used to find the other variables. + * the `prev/next` pointers can be used to find the other variables. */ void driver_variable_unique_name(struct DriverVar *dvar); /** diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h index 6e4864d8abc..fa3f355c5dd 100644 --- a/source/blender/blenkernel/BKE_lib_override.h +++ b/source/blender/blenkernel/BKE_lib_override.h @@ -85,8 +85,8 @@ bool BKE_lib_override_library_is_user_edited(struct ID *id); /** * Create an overridden local copy of linked reference. * - * \note This function is very basic, low-level. It does not consider any hierarcical dependency, - * and also prevents any automatic resync of this local override. + * \note This function is very basic, low-level. It does not consider any hierarchical dependency, + * and also prevents any automatic re-sync of this local override. */ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain, struct ID *reference_id, diff --git a/source/blender/blenkernel/BKE_node_tree_update.h b/source/blender/blenkernel/BKE_node_tree_update.h index d549eec2247..f77bd83a8ef 100644 --- a/source/blender/blenkernel/BKE_node_tree_update.h +++ b/source/blender/blenkernel/BKE_node_tree_update.h @@ -35,7 +35,7 @@ extern "C" { * Tag tree as changed without providing any more information about what has changed exactly. * The update process has to assume that everything may have changed. * - * Using one of the methods below to tag the tree after changes is preffered when possible. + * Using one of the methods below to tag the tree after changes is preferred when possible. */ void BKE_ntree_update_tag_all(struct bNodeTree *ntree); diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index a7d39598e54..ffb5481f324 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -494,7 +494,7 @@ void BKE_object_handle_update(struct Depsgraph *depsgraph, struct Scene *scene, * * Function below is polluted with proxy exceptions, cleanup will follow! * - * The main object update call, for object matrix, constraints, keys and displist (modifiers) + * The main object update call, for object matrix, constraints, keys and #DispList (modifiers) * requires flags to be set! * * Ideally we shouldn't have to pass the rigid body world, diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c b/source/blender/blenkernel/intern/blendfile_link_append.c index 23e9e6bfbbb..169a410bccc 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.c +++ b/source/blender/blenkernel/intern/blendfile_link_append.c @@ -644,7 +644,7 @@ static void loose_data_instantiate_collection_process( */ Collection *collection = (Collection *)id; /* The collection could be linked/appended together with an Empty object instantiating it, - * better not instantiate the collection in the viewlayer in that case. + * better not instantiate the collection in the view-layer in that case. * * Can easily happen when copy/pasting such instantiating empty, see T93839. */ const bool collection_is_instantiated = collection_instantiated_by_any_object(bmain, @@ -653,7 +653,7 @@ static void loose_data_instantiate_collection_process( bool do_add_collection = (item->tag & LINK_APPEND_TAG_INDIRECT) == 0 && !collection_is_instantiated; /* In linking case, do not enforce instantiating non-directly linked collections/objects. - * This avoids cluttering the ViewLayers, user can instantiate themselves specific collections + * This avoids cluttering the view-layers, user can instantiate themselves specific collections * or objects easily from the Outliner if needed. */ if (!do_add_collection && do_append && !collection_is_instantiated) { LISTBASE_FOREACH (CollectionObject *, coll_ob, &collection->gobject) { diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index d284c32b1df..312feae4665 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3755,7 +3755,7 @@ static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ copy_m4_m4(tarmat, ct->matrix); if (data->flag & MINMAX_USEROT) { - /* take rotation of target into account by doing the transaction in target's localspace */ + /* Take rotation of target into account by doing the transaction in target's local-space. */ invert_m4_m4(imat, tarmat); mul_m4_m4m4(tmat, imat, obmat); copy_m4_m4(obmat, tmat); @@ -3800,7 +3800,7 @@ static void minmax_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *targ if (val1 > val2) { obmat[3][index] = tarmat[3][index] + data->offset; if (data->flag & MINMAX_USEROT) { - /* get out of localspace */ + /* Get out of local-space. */ mul_m4_m4m4(tmat, ct->matrix, obmat); copy_m4_m4(cob->matrix, tmat); } diff --git a/source/blender/blenkernel/intern/customdata.cc b/source/blender/blenkernel/intern/customdata.cc index 30ba3500c5d..59d9039fff5 100644 --- a/source/blender/blenkernel/intern/customdata.cc +++ b/source/blender/blenkernel/intern/customdata.cc @@ -285,7 +285,7 @@ static void layerInterp_mdeformvert(const void **sources, tmp_dwlink->dw.def_nr = dw->def_nr; tmp_dwlink->dw.weight = weight; - /* inline linklist */ + /* Inline linked-list. */ tmp_dwlink->next = dest_dwlink; dest_dwlink = tmp_dwlink; diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index af0d91d29fc..2f5c5d0a0d5 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -466,7 +466,7 @@ void outside_lattice(Lattice *lt) bp->hide = 1; bp->f1 &= ~SELECT; - /* u extrema */ + /* U extrema. */ bp1 = latt_bp(lt, 0, v, w); bp2 = latt_bp(lt, lt->pntsu - 1, v, w); @@ -475,7 +475,7 @@ void outside_lattice(Lattice *lt) bp->vec[1] = (1.0f - fac1) * bp1->vec[1] + fac1 * bp2->vec[1]; bp->vec[2] = (1.0f - fac1) * bp1->vec[2] + fac1 * bp2->vec[2]; - /* v extrema */ + /* V extrema. */ bp1 = latt_bp(lt, u, 0, w); bp2 = latt_bp(lt, u, lt->pntsv - 1, w); @@ -484,7 +484,7 @@ void outside_lattice(Lattice *lt) bp->vec[1] += (1.0f - fac1) * bp1->vec[1] + fac1 * bp2->vec[1]; bp->vec[2] += (1.0f - fac1) * bp1->vec[2] + fac1 * bp2->vec[2]; - /* w extrema */ + /* W extrema. */ bp1 = latt_bp(lt, u, v, 0); bp2 = latt_bp(lt, u, v, lt->pntsw - 1); diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index b0c93a5614d..e8975c82c46 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -106,7 +106,7 @@ static void movie_clip_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_s MovieClip *movie_clip_dst = (MovieClip *)id_dst; const MovieClip *movie_clip_src = (const MovieClip *)id_src; - /* We never handle usercount here for own data. */ + /* We never handle user-count here for own data. */ const int flag_subdata = flag | LIB_ID_CREATE_NO_USER_REFCOUNT; movie_clip_dst->anim = NULL; @@ -1178,7 +1178,7 @@ static ImBuf *get_postprocessed_cached_frame(const MovieClip *clip, return NULL; } - /* postprocessing happened for other frame */ + /* Postprocessing happened for other frame. */ if (cache->postprocessed.framenr != framenr) { return NULL; } diff --git a/source/blender/blenkernel/intern/multires_reshape_util.c b/source/blender/blenkernel/intern/multires_reshape_util.c index 07a5d7c4a61..49d880e04cc 100644 --- a/source/blender/blenkernel/intern/multires_reshape_util.c +++ b/source/blender/blenkernel/intern/multires_reshape_util.c @@ -135,7 +135,7 @@ static void context_init_commoon(MultiresReshapeContext *reshape_context) static bool context_is_valid(MultiresReshapeContext *reshape_context) { if (reshape_context->mdisps == NULL) { - /* Multires displacement has been removed before current changes were applies. */ + /* Multi-resolution displacement has been removed before current changes were applies. */ return false; } return true; diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 8989450e41b..3ddcdb424f9 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -734,7 +734,7 @@ void BKE_packedfile_pack_all_libraries(Main *bmain, ReportList *reports) { Library *lib; - /* test for relativenss */ + /* Test for relativeness. */ for (lib = bmain->libraries.first; lib; lib = lib->id.next) { if (!BLI_path_is_rel(lib->filepath)) { break; diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index b811c17a3bc..baabf57f0c3 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1673,7 +1673,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], if ((opco[0] < minx) || (opco[1] < miny) || (opco[2] < minz) || (opco[0] > maxx) || (opco[1] > maxy) || (opco[2] > maxz)) { - /* outside the padded boundbox --> collision object is too far away */ + /* Outside the padded bound-box -> collision object is too far away. */ BLI_ghashIterator_step(ihash); continue; } diff --git a/source/blender/blenkernel/intern/subdiv_eval.c b/source/blender/blenkernel/intern/subdiv_eval.c index 9733a1498a6..51a2aa673bc 100644 --- a/source/blender/blenkernel/intern/subdiv_eval.c +++ b/source/blender/blenkernel/intern/subdiv_eval.c @@ -264,8 +264,8 @@ void BKE_subdiv_eval_limit_point_and_derivatives(Subdiv *subdiv, * This happens, for example, in single vertex on Suzannne's nose (where two quads have 2 common * edges). * - * This makes tangent space displacement (such as multires) impossible to be used in those - * vertices, so those needs to be addressed in one way or another. + * This makes tangent space displacement (such as multi-resolution) impossible to be used in + * those vertices, so those needs to be addressed in one way or another. * * Simplest thing to do: step inside of the face a little bit, where there is known patch at * which there must be proper derivatives. This might break continuity of normals, but is better diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c index 1f31d0543ad..9630b30a21e 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_mesh.c @@ -517,7 +517,7 @@ static bool subdiv_mesh_topology_info(const SubdivForeachContext *foreach_contex const int num_polygons, const int *UNUSED(subdiv_polygon_offset)) { - /* Multires grid data will be applied or become invalid after subdivision, + /* Multi-resolution grid data will be applied or become invalid after subdivision, * so don't try to preserve it and use memory. */ CustomData_MeshMasks mask = CD_MASK_EVERYTHING; mask.lmask &= ~CD_MASK_MULTIRES_GRIDS; diff --git a/source/blender/blenkernel/intern/tracking_region_tracker.c b/source/blender/blenkernel/intern/tracking_region_tracker.c index ad3f226fa92..2265c05463b 100644 --- a/source/blender/blenkernel/intern/tracking_region_tracker.c +++ b/source/blender/blenkernel/intern/tracking_region_tracker.c @@ -42,7 +42,7 @@ /* **** utility functions for tracking **** */ -/* convert from float and byte RGBA to grayscale. Supports different coefficients for RGB. */ +/** Convert from float and byte RGBA to gray-scale. Supports different coefficients for RGB. */ static void float_rgba_to_gray(const float *rgba, float *gray, int num_pixels, @@ -71,7 +71,7 @@ static void uint8_rgba_to_float_gray(const unsigned char *rgba, } } -/* Get grayscale float search buffer for given marker and frame. */ +/** Get gray-scale float search buffer for given marker and frame. */ static float *track_get_search_floatbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h index 9492a252fed..76009810eb9 100644 --- a/source/blender/blenlib/BLI_smallhash.h +++ b/source/blender/blenlib/BLI_smallhash.h @@ -61,7 +61,7 @@ void BLI_smallhash_init(SmallHash *sh) ATTR_NONNULL(1); void BLI_smallhash_release(SmallHash *sh) ATTR_NONNULL(1); void BLI_smallhash_insert(SmallHash *sh, uintptr_t key, void *item) ATTR_NONNULL(1); /** - * Inserts a new value to a key that may already be in ghash. + * Inserts a new value to a key that may already be in #GHash. * * Avoids #BLI_smallhash_remove, #BLI_smallhash_insert calls (double lookups) * diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 1b9457496ef..b902458bd0b 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -651,11 +651,12 @@ extern bool BLI_memory_is_zero(const void *arr, const size_t arr_size); /** \name String Macros * \{ */ -/* Macro to convert a value to string in the pre-processor: +/* Macro to convert a value to string in the preprocessor: * - `STRINGIFY_ARG`: gives the argument as a string * - `STRINGIFY_APPEND`: appends any argument 'b' onto the string argument 'a', - * used by `STRINGIFY` because some preprocessors warn about zero arguments + * used by `STRINGIFY` because some preprocessors warn about zero arguments. * - `STRINGIFY`: gives the argument's value as a string. */ + #define STRINGIFY_ARG(x) "" #x #define STRINGIFY_APPEND(a, b) "" a #b #define STRINGIFY(x) STRINGIFY_APPEND("", x) diff --git a/source/blender/blenlib/intern/array_store.c b/source/blender/blenlib/intern/array_store.c index 08696c9168d..825682736e8 100644 --- a/source/blender/blenlib/intern/array_store.c +++ b/source/blender/blenlib/intern/array_store.c @@ -439,7 +439,7 @@ static void bchunk_list_ensure_min_size_last(const BArrayInfo *info, if (data_merge_len <= info->chunk_byte_size_max) { /* we have enough space to merge */ - /* remove last from linklist */ + /* Remove last from the linked-list. */ BLI_assert(chunk_list->chunk_refs.last != chunk_list->chunk_refs.first); cref->prev->next = NULL; chunk_list->chunk_refs.last = cref->prev; diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index febe1568176..a7f229e7147 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -261,7 +261,7 @@ MINLINE void cpack_cpy_3ub(unsigned char r_col[3], const unsigned int pack) } /* -------------------------------------------------------------------- */ -/** \name RGB/Grayscale Functions +/** \name RGB/Gray-Scale Functions * * \warning * These are only an approximation, diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 958480cc616..56ff71fb670 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -957,15 +957,15 @@ bool BLI_path_abs(char *path, const char *basepath) #endif - /* push slashes into unix mode - strings entering this part are + /* NOTE(@jesterKing): push slashes into unix mode - strings entering this part are * potentially messed up: having both back- and forward slashes. * Here we push into one conform direction, and at the end we * push them into the system specific dir. This ensures uniformity - * of paths and solving some problems (and prevent potential future - * ones) -jesterKing. - * For UNC paths the first characters containing the UNC prefix + * of paths and solving some problems (and prevent potential future ones). + * + * NOTE(@elubie): For UNC paths the first characters containing the UNC prefix * shouldn't be switched as we need to distinguish them from - * paths relative to the .blend file -elubie */ + * paths relative to the `.blend` file. */ BLI_str_replace_char(tmp + BLI_path_unc_prefix_len(tmp), '\\', '/'); /* Paths starting with `//` will get the blend file as their base, diff --git a/source/blender/blenlib/intern/polyfill_2d.c b/source/blender/blenlib/intern/polyfill_2d.c index 2a02abf147a..0ade306bcb9 100644 --- a/source/blender/blenlib/intern/polyfill_2d.c +++ b/source/blender/blenlib/intern/polyfill_2d.c @@ -147,7 +147,7 @@ typedef struct PolyFill { #endif } PolyFill; -/* circular linklist */ +/** Circular double linked-list. */ typedef struct PolyIndex { struct PolyIndex *next, *prev; uint index; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 26ecc7552dc..9fe82069d2c 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -357,8 +357,10 @@ static ScanFillVertLink *addedgetoscanlist(ScanFillVertLink *scdata, return NULL; } +/** + * Return true if `eve` inside the bound-box of `eed`. + */ static bool boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve) -/* is eve inside boundbox eed */ { float minx, maxx, miny, maxy; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 56047bb7f4f..f325cec31fd 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -254,7 +254,7 @@ typedef struct OldNewMap { /* Array that stores the actual entries. */ OldNew *entries; int nentries; - /* Hashmap that stores indices into the `entries` array. */ + /* Hash-map that stores indices into the `entries` array. */ int32_t *map; int capacity_exp; diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 202a2a95a7c..bee8bb757e4 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1004,7 +1004,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) int a, tot; /* shape keys are no longer applied to the mesh itself, but rather - * to the derivedmesh/displist, so here we ensure that the basis + * to the evaluated #Mesh / #DispList, so here we ensure that the basis * shape key is always set in the mesh coordinates. */ for (me = bmain->meshes.first; me; me = me->id.next) { if ((key = blo_do_versions_newlibadr(fd, lib, me->key)) && key->refkey) { diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index c60e8af68e5..de974587311 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -800,7 +800,8 @@ typedef struct BMOIter { int cur; // for arrays GHashIterator giter; void **val; - char restrictmask; /* bitwise '&' with BMHeader.htype */ + /** Bit-wise '&' with #BMHeader.htype */ + char restrictmask; } BMOIter; void *BMO_slot_buffer_get_first(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name); diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c index e1f7430bc53..0e13c4c8128 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.c +++ b/source/blender/bmesh/intern/bmesh_walkers.c @@ -33,19 +33,19 @@ /** * NOTE(@joeedh): Details on design. * - * original design: walkers directly emulation recursive functions. - * functions save their state onto a worklist, and also add new states - * to implement recursive or looping behavior. generally only one - * state push per call with a specific state is desired. + * Original design: walkers directly emulation recursive functions. + * functions save their state onto a #BMWalker.worklist, and also add new states + * to implement recursive or looping behavior. + * Generally only one state push per call with a specific state is desired. * * basic design pattern: the walker step function goes through its * list of possible choices for recursion, and recurses (by pushing a new state) - * using the first non-visited one. This choice is the flagged as visited using - * the ghash. each step may push multiple new states onto the worklist at once. + * using the first non-visited one. This choice is the flagged as visited using the #GHash. + * Each step may push multiple new states onto the #BMWalker.worklist at once. * * - Walkers use tool flags, not header flags. - * - Walkers now use ghash for storing visited elements, - * rather than stealing flags. ghash can be rewritten + * - Walkers now use #GHash for storing visited elements, + * rather than stealing flags. #GHash can be rewritten * to be faster if necessary, in the far future :) . * - tools should ALWAYS have necessary error handling * for if walkers fail. diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h index 8a69dbf3312..db82af6d43e 100644 --- a/source/blender/depsgraph/DEG_depsgraph_build.h +++ b/source/blender/depsgraph/DEG_depsgraph_build.h @@ -120,7 +120,7 @@ typedef enum eDepsObjectComponentType { DEG_OB_COMP_ANIMATION, /* Transform Component (Parenting/Constraints) */ DEG_OB_COMP_TRANSFORM, - /* Geometry Component (Mesh/Displist) */ + /* Geometry Component (#Mesh / #DispList). */ DEG_OB_COMP_GEOMETRY, /* Evaluation-Related Outer Types (with Sub-data) */ diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 116dba054fa..b1204c9366c 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -1010,7 +1010,7 @@ void deg_free_copy_on_write_datablock(ID *id_cow) case ID_OB: { /* TODO(sergey): This workaround is only to prevent free derived * caches from modifying object->data. This is currently happening - * due to mesh/curve datablock boundbox tagging dirty. */ + * due to mesh/curve data-block bound-box tagging dirty. */ Object *ob_cow = (Object *)id_cow; ob_cow->data = nullptr; ob_cow->sculpt = nullptr; diff --git a/source/blender/depsgraph/intern/node/deg_node.h b/source/blender/depsgraph/intern/node/deg_node.h index 6cb5e31303f..25bbb9a7237 100644 --- a/source/blender/depsgraph/intern/node/deg_node.h +++ b/source/blender/depsgraph/intern/node/deg_node.h @@ -83,7 +83,7 @@ enum class NodeType { ANIMATION, /* Transform Component (Parenting/Constraints) */ TRANSFORM, - /* Geometry Component (Mesh/Displist) */ + /* Geometry Component (#Mesh / #DispList) */ GEOMETRY, /* Sequencer Component (Scene Only) */ SEQUENCER, diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index a0522ad94d2..a027a29c813 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -353,7 +353,7 @@ void EEVEE_materials_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata) EEVEE_StorageList *stl = ((EEVEE_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); - /* Create Material Ghash */ + /* Create Material #GHash. */ { stl->g_data->material_hash = BLI_ghash_ptr_new("Eevee_material ghash"); diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index f0d518a58b1..34af8b6c58d 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -192,8 +192,8 @@ enum { /* Material shader cache keys */ enum { /* HACK: This assumes the struct GPUShader will never be smaller than our variations. - * This allow us to only keep one ghash and avoid bigger keys comparisons/hashing. - * We combine the GPUShader pointer with the key. */ + * This allow us to only keep one #GHash and avoid bigger keys comparisons/hashing. + * We combine the #GPUShader pointer with the key. */ KEY_CULL = (1 << 0), KEY_REFRACT = (1 << 1), KEY_HAIR = (1 << 2), diff --git a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c index 17cc1a46e23..0d6bd1f8024 100644 --- a/source/blender/draw/engines/eevee/eevee_screen_raytrace.c +++ b/source/blender/draw/engines/eevee/eevee_screen_raytrace.c @@ -128,7 +128,7 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v int hitbuf_size[3]; GPU_texture_get_mipmap_size(effects->ssr_hit_output, 0, hitbuf_size); - /** Screen space raytracing overview + /** Screen space ray-tracing overview * * Following Frostbite stochastic SSR. * diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h index 29a9c0211be..bf5dbac9f68 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.h +++ b/source/blender/draw/engines/gpencil/gpencil_engine.h @@ -108,7 +108,7 @@ BLI_STATIC_ASSERT_ALIGN(gpLight, 16) /* *********** Draw Data *********** */ typedef struct GPENCIL_MaterialPool { - /* Linklist. */ + /* Single linked-list. */ struct GPENCIL_MaterialPool *next; /* GPU representation of materials. */ gpMaterial mat_data[GP_MATERIAL_BUFFER_LEN]; @@ -148,7 +148,7 @@ typedef struct GPENCIL_ViewLayerData { /* *********** GPencil *********** */ typedef struct GPENCIL_tVfx { - /** Linklist */ + /** Single linked-list. */ struct GPENCIL_tVfx *next; DRWPass *vfx_ps; /* Frame-buffer reference since it may not be allocated yet. */ @@ -156,7 +156,7 @@ typedef struct GPENCIL_tVfx { } GPENCIL_tVfx; typedef struct GPENCIL_tLayer { - /** Linklist */ + /** Single linked-list. */ struct GPENCIL_tLayer *next; /** Geometry pass (draw all strokes). */ DRWPass *geom_ps; @@ -172,7 +172,7 @@ typedef struct GPENCIL_tLayer { } GPENCIL_tLayer; typedef struct GPENCIL_tObject { - /** Linklist */ + /** Single linked-list. */ struct GPENCIL_tObject *next; struct { diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c index d70633eaa85..c24cab009c7 100644 --- a/source/blender/draw/engines/workbench/workbench_materials.c +++ b/source/blender/draw/engines/workbench/workbench_materials.c @@ -198,7 +198,7 @@ DRWShadingGroup *workbench_material_setup_ex(WORKBENCH_PrivateData *wpd, } DRWShadingGroup **grp_mat = NULL; - /* A hashmap stores material shgroups to pack all similar drawcalls together. */ + /* A hash-map stores material shgroups to pack all similar drawcalls together. */ if (BLI_ghash_ensure_p(prepass->material_hash, ma, (void ***)&grp_mat)) { return *grp_mat; } @@ -277,7 +277,7 @@ DRWShadingGroup *workbench_image_setup_ex(WORKBENCH_PrivateData *wpd, WORKBENCH_Prepass *prepass = &wpd->prepass[transp][infront][datatype]; DRWShadingGroup **grp_tex = NULL; - /* A hashmap stores image shgroups to pack all similar drawcalls together. */ + /* A hash-map stores image shgroups to pack all similar drawcalls together. */ if (BLI_ghash_ensure_p(prepass->material_hash, tex, (void ***)&grp_tex)) { return *grp_tex; } diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 961aed3f284..6c4744cb104 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -351,7 +351,7 @@ typedef enum { DRW_STATE_BLEND_ADD_FULL = (2 << 11), /** Standard alpha blending. */ DRW_STATE_BLEND_ALPHA = (3 << 11), - /** Use that if color is already premult by alpha. */ + /** Use that if color is already pre-multiply by alpha. */ DRW_STATE_BLEND_ALPHA_PREMUL = (4 << 11), DRW_STATE_BLEND_BACKGROUND = (5 << 11), DRW_STATE_BLEND_OIT = (6 << 11), diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index f8d8674f2a7..06b83a379e4 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -1135,9 +1135,11 @@ static uint get_dispatch_size(uint elements) return divide_ceil_u(elements, SUBDIV_LOCAL_WORK_GROUP_SIZE); } -/* Helper to ensure that the UBO is always initalized before dispatching computes and that the same - * number of elements that need to be processed is used for the UBO and the dispatch size. - * Use this instead of a raw call to #GPU_compute_dispatch. */ +/** + * Helper to ensure that the UBO is always initialized before dispatching computes and that the + * same number of elements that need to be processed is used for the UBO and the dispatch size. + * Use this instead of a raw call to #GPU_compute_dispatch. + */ static void drw_subdiv_compute_dispatch(const DRWSubdivCache *cache, GPUShader *shader, const int src_offset, @@ -1219,8 +1221,8 @@ void draw_subdiv_extract_pos_nor(const DRWSubdivCache *cache, drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_quads); - /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We - * also need it for subsequent compute shaders, so a barrier on the shader storage is also + /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array. + * We also need it for subsequent compute shaders, so a barrier on the shader storage is also * needed. */ GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY); @@ -1389,8 +1391,8 @@ void draw_subdiv_accumulate_normals(const DRWSubdivCache *cache, drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_verts); - /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We - * also need it for subsequent compute shaders, so a barrier on the shader storage is also + /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array. + * We also need it for subsequent compute shaders, so a barrier on the shader storage is also * needed. */ GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY); @@ -1413,8 +1415,8 @@ void draw_subdiv_finalize_normals(const DRWSubdivCache *cache, drw_subdiv_compute_dispatch(cache, shader, 0, 0, cache->num_subdiv_quads); - /* This generates a vertex buffer, so we need to put a barrier on the vertex attrib array. We - * also need it for subsequent compute shaders, so a barrier on the shader storage is also + /* This generates a vertex buffer, so we need to put a barrier on the vertex attribute array. + * We also need it for subsequent compute shaders, so a barrier on the shader storage is also * needed. */ GPU_memory_barrier(GPU_BARRIER_SHADER_STORAGE | GPU_BARRIER_VERTEX_ATTRIB_ARRAY); diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 0bf6468f7cc..94950a1ff94 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -1796,12 +1796,12 @@ void DRW_draw_render_loop_offscreen(struct Depsgraph *depsgraph, DRW_draw_render_loop_ex(depsgraph, engine_type, region, v3d, render_viewport, NULL); if (draw_background) { - /* HACK(fclem): In this case we need to make sure the final alpha is 1. + /* HACK(@fclem): In this case we need to make sure the final alpha is 1. * We use the blend mode to ensure that. A better way to fix that would * be to do that in the color-management shader. */ GPU_offscreen_bind(ofs, false); GPU_clear_color(0.0f, 0.0f, 0.0f, 1.0f); - /* Premult Alpha over black background. */ + /* Pre-multiply alpha over black background. */ GPU_blend(GPU_BLEND_ALPHA_PREMULT); } diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h index a4924711384..d27eb8be9e0 100644 --- a/source/blender/draw/intern/draw_manager.h +++ b/source/blender/draw/intern/draw_manager.h @@ -570,7 +570,7 @@ typedef struct DRWManager { struct Object *dupli_origin; /** Object-data referenced by the current dupli object. */ struct ID *dupli_origin_data; - /** Ghash: #DupliKey -> void pointer for each enabled engine. */ + /** Hash-map: #DupliKey -> void pointer for each enabled engine. */ struct GHash *dupli_ghash; /** TODO(fclem): try to remove usage of this. */ DRWInstanceData *object_instance_data[MAX_INSTANCE_DATA_SIZE]; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc index 0ea4ef5d5db..49b23ff1efe 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_angle.cc @@ -240,7 +240,7 @@ static void extract_edituv_stretch_angle_init_subdiv(const DRWSubdivCache *subdi GPUVertBuf *pos_nor = cache->final.buff.vbo.pos_nor; GPUVertBuf *uvs = cache->final.buff.vbo.uv; - /* UVs are stored contiguouly so we need to compute the offset in the UVs buffer for the active + /* UVs are stored contiguously so we need to compute the offset in the UVs buffer for the active * UV layer. */ CustomData *cd_ldata = (mr->extract_type == MR_EXTRACT_MESH) ? &mr->me->ldata : &mr->bm->ldata; diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc index 3b40b3115f5..c116fa5ba07 100644 --- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc +++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_edituv_stretch_area.cc @@ -152,7 +152,7 @@ static void extract_edituv_stretch_area_init_subdiv(const DRWSubdivCache *subdiv void *UNUSED(data)) { - /* Initialise final buffer. */ + /* Initialize final buffer. */ GPUVertBuf *vbo = static_cast<GPUVertBuf *>(buffer); static GPUVertFormat format = {0}; if (format.attr_len == 0) { diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 196cd1028ea..25f03058597 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -1132,7 +1132,7 @@ static void annotation_stroke_eraser_dostroke(tGPsdata *p, if (!(p->flags & GP_PAINTFLAG_SELECTMASK) || (gps->points->flag & GP_SPOINT_SELECT)) { gpencil_point_to_xy(&p->gsc, gps, gps->points, &pc1[0], &pc1[1]); - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ if (len_v2v2_int(mval_i, pc1) <= radius) { @@ -1174,7 +1174,7 @@ static void annotation_stroke_eraser_dostroke(tGPsdata *p, gpencil_point_to_xy(&p->gsc, gps, pt1, &pc1[0], &pc1[1]); gpencil_point_to_xy(&p->gsc, gps, pt2, &pc2[0], &pc2[1]); - /* Check that point segment of the boundbox of the eraser stroke */ + /* Check that point segment of the bound-box of the eraser stroke. */ if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index b52d4a410ec..73a94f066e3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1486,7 +1486,7 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p, bGPDspoint pt_temp; gpencil_point_to_parent_space(gps->points, p->diff_mat, &pt_temp); gpencil_point_to_xy(&p->gsc, gps, &pt_temp, &pc1[0], &pc1[1]); - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ if (len_v2v2_int(mval_i, pc1) <= radius) { @@ -1511,7 +1511,7 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p, gpencil_point_to_parent_space(pt1, p->diff_mat, &npt); gpencil_point_to_xy(&p->gsc, gps, &npt, &pc1[0], &pc1[1]); - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ if (len_v2v2_int(mval_i, pc1) <= radius) { @@ -1581,7 +1581,7 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p, copy_v2_v2_int(pc0, pc1); } - /* Check that point segment of the boundbox of the eraser stroke */ + /* Check that point segment of the bound-box of the eraser stroke. */ if (((!ELEM(V2D_IS_CLIPPED, pc0[0], pc0[1])) && BLI_rcti_isect_pt(rect, pc0[0], pc0[1])) || ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index 186c45c9f39..50c7202599a 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -1454,7 +1454,7 @@ static bool gpencil_sculpt_brush_do_stroke(tGP_BrushEditData *gso, gpencil_point_to_xy(gsc, gps, &pt_temp, &pc1[0], &pc1[1]); pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ int mval_i[2]; @@ -1492,7 +1492,7 @@ static bool gpencil_sculpt_brush_do_stroke(tGP_BrushEditData *gso, gpencil_point_to_parent_space(pt2, diff_mat, &npt); gpencil_point_to_xy(gsc, gps, &npt, &pc2[0], &pc2[1]); - /* Check that point segment of the boundbox of the selection stroke */ + /* Check that point segment of the bound-box of the selection stroke. */ if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with diff --git a/source/blender/editors/gpencil/gpencil_vertex_paint.c b/source/blender/editors/gpencil/gpencil_vertex_paint.c index 633e371cbd1..05304f9914f 100644 --- a/source/blender/editors/gpencil/gpencil_vertex_paint.c +++ b/source/blender/editors/gpencil/gpencil_vertex_paint.c @@ -441,12 +441,12 @@ static bool brush_tint_apply(tGP_BrushVertexpaintData *gso, CLAMP_MIN(pt->vert_color[3], 0.0f); } else { - /* Premult. */ + /* Pre-multiply. */ mul_v3_fl(pt->vert_color, pt->vert_color[3]); /* "Alpha over" blending. */ interp_v3_v3v3(pt->vert_color, pt->vert_color, gso->linear_color, inf); pt->vert_color[3] = pt->vert_color[3] * (1.0 - inf) + inf; - /* Un-premult. */ + /* Un pre-multiply. */ if (pt->vert_color[3] > 0.0f) { mul_v3_fl(pt->vert_color, 1.0f / pt->vert_color[3]); } @@ -460,12 +460,12 @@ static bool brush_tint_apply(tGP_BrushVertexpaintData *gso, CLAMP_MIN(gps->vert_color_fill[3], 0.0f); } else { - /* Premult. */ + /* Pre-multiply. */ mul_v3_fl(gps->vert_color_fill, gps->vert_color_fill[3]); /* "Alpha over" blending. */ interp_v3_v3v3(gps->vert_color_fill, gps->vert_color_fill, gso->linear_color, inf_fill); gps->vert_color_fill[3] = gps->vert_color_fill[3] * (1.0 - inf_fill) + inf_fill; - /* Un-premult. */ + /* Un pre-multiply. */ if (gps->vert_color_fill[3] > 0.0f) { mul_v3_fl(gps->vert_color_fill, 1.0f / gps->vert_color_fill[3]); } @@ -865,7 +865,7 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, gpencil_point_to_xy(gsc, gps, &pt_temp, &pc1[0], &pc1[1]); pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ int mval_i[2]; @@ -905,7 +905,7 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso, gpencil_point_to_parent_space(pt2, diff_mat, &npt); gpencil_point_to_xy(gsc, gps, &npt, &pc2[0], &pc2[1]); - /* Check that point segment of the boundbox of the selection stroke */ + /* Check that point segment of the bound-box of the selection stroke. */ if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with diff --git a/source/blender/editors/gpencil/gpencil_weight_paint.c b/source/blender/editors/gpencil/gpencil_weight_paint.c index b3249294119..15f99d83f6d 100644 --- a/source/blender/editors/gpencil/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil/gpencil_weight_paint.c @@ -432,7 +432,7 @@ static void gpencil_weightpaint_select_stroke(tGP_BrushWeightpaintData *gso, gpencil_point_to_xy(gsc, gps, &pt_temp, &pc1[0], &pc1[1]); pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; - /* do boundbox check first */ + /* Do bound-box check first. */ if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ int mval_i[2]; @@ -461,7 +461,7 @@ static void gpencil_weightpaint_select_stroke(tGP_BrushWeightpaintData *gso, gpencil_point_to_parent_space(pt2, diff_mat, &npt); gpencil_point_to_xy(gsc, gps, &npt, &pc2[0], &pc2[1]); - /* Check that point segment of the boundbox of the selection stroke */ + /* Check that point segment of the bound-box of the selection stroke */ if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 5e50a17e80a..49ca5a4c5a3 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -513,7 +513,7 @@ void ED_gpencil_vgroup_remove(struct bContext *C, struct Object *ob); */ void ED_gpencil_vgroup_select(struct bContext *C, struct Object *ob); /** - * Unselect points of vertex group. + * Un-select points of vertex group. */ void ED_gpencil_vgroup_deselect(struct bContext *C, struct Object *ob); diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 35838f4ce48..3d8bdd09711 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -60,13 +60,13 @@ struct wmOperator; /* editmesh_utils.c */ /** - * \param em: Editmesh. + * \param em: Edit-mesh used for generating mirror data. * \param use_self: Allow a vertex to point to its self (middle verts). * \param use_select: Restrict to selected verts. * \param respecthide: Skip hidden vertices. * \param use_topology: Use topology mirror. * \param maxdist: Distance for close point test. - * \param r_index: Optional array to write into, as an alternative to a customdata layer + * \param r_index: Optional array to write into, as an alternative to a custom-data layer * (length of total verts). */ void EDBM_verts_mirror_cache_begin_ex(struct BMEditMesh *em, @@ -672,7 +672,7 @@ int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em, struct Me /** * Wrapper for object-mode/edit-mode. * - * call #BM_mesh_elem_table_ensure first for editmesh. + * call #BM_mesh_elem_table_ensure first for edit-mesh. */ int ED_mesh_mirror_get_vert(struct Object *ob, int index); diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index f0d6072fdbc..4f9bdfadbdf 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -188,7 +188,7 @@ void ED_widgetgroup_gizmo2d_rotate_callbacks_set(struct wmGizmoGroupType *gzgt); struct TransformBounds { float center[3]; /* Center for transform widget. */ - float min[3], max[3]; /* Boundbox of selection for transform widget. */ + float min[3], max[3]; /* Bounding-box of selection for transform widget. */ /* Normalized axis */ float axis[3][3]; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 659ac0ae899..7521ccf4e4c 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7927,7 +7927,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * const bool do_copy = event->type == EVT_CKEY && is_press_ctrl_but_no_shift; const bool do_paste = event->type == EVT_VKEY && is_press_ctrl_but_no_shift; - /* Specific handling for listrows, we try to find their overlapping tex button. */ + /* Specific handling for list-rows, we try to find their overlapping text button. */ if ((do_copy || do_paste) && but->type == UI_BTYPE_LISTROW) { uiBut *labelbut = ui_but_list_row_text_activate(C, but, data, event, BUTTON_ACTIVATE_OVER); if (labelbut) { diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 643fa128d08..76063412758 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -173,11 +173,11 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs, BLF_enable(fs->uifont_id, font_flag); if (fs_params->word_wrap == 1) { - /* draw from boundbox top */ + /* Draw from bound-box top. */ yofs = BLI_rcti_size_y(rect) - BLF_height_max(fs->uifont_id); } else { - /* draw from boundbox center */ + /* Draw from bound-box center. */ const float height = BLF_ascender(fs->uifont_id) + BLF_descender(fs->uifont_id); yofs = ceil(0.5f * (BLI_rcti_size_y(rect) - height)); } diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c index 1e1e3c2ff42..746aabf87cf 100644 --- a/source/blender/editors/io/io_obj.c +++ b/source/blender/editors/io/io_obj.c @@ -234,7 +234,7 @@ static bool wm_obj_export_check(bContext *C, wmOperator *op) /* Both forward and up axes cannot be the same (or same except opposite sign). */ if (RNA_enum_get(op->ptr, "forward_axis") % TOTAL_AXES == (RNA_enum_get(op->ptr, "up_axis") % TOTAL_AXES)) { - /* TODO (ankitm) Show a warning here. */ + /* TODO(@ankitm): Show a warning here. */ RNA_enum_set(op->ptr, "up_axis", RNA_enum_get(op->ptr, "up_axis") % TOTAL_AXES + 1); changed = true; } diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c index 30a453a32ee..e48b5d8255e 100644 --- a/source/blender/editors/mesh/editmesh_path.c +++ b/source/blender/editors/mesh/editmesh_path.c @@ -377,7 +377,7 @@ static void edgetag_ensure_cd_flag(Mesh *me, const char edge_mode) } } -/* mesh shortest path select, uses prev-selected edge */ +/* Mesh shortest path select, uses previously-selected edge. */ /* since you want to create paths with multiple selects, it doesn't have extend option */ static void mouse_mesh_shortest_path_edge(Scene *scene, diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 80e3f934c80..3214180309b 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -373,7 +373,7 @@ static void dynamicPaint_bakeImageSequence(DynamicPaintBakeJob *job) /* Show progress bar. */ *(job->do_update) = true; - /* Set frame to start point (also inits modifier data) */ + /* Set frame to start point (also initializes modifier data). */ frame = surface->start_frame; orig_frame = input_scene->r.cfra; input_scene->r.cfra = (int)frame; diff --git a/source/blender/editors/render/render_internal.cc b/source/blender/editors/render/render_internal.cc index 441be3a6ce3..1d0de322271 100644 --- a/source/blender/editors/render/render_internal.cc +++ b/source/blender/editors/render/render_internal.cc @@ -124,13 +124,13 @@ static bool image_buffer_calc_tile_rect(const RenderResult *rr, /* When `renrect` argument is not nullptr, we only refresh scan-lines. */ if (renrect) { - /* if (tile_height == recty), rendering of layer is ready, + /* `if (tile_height == recty)`, rendering of layer is ready, * we should not draw, other things happen... */ if (rr->renlay == nullptr || renrect->ymax >= rr->recty) { return false; } - /* tile_x here is first subrect x coord, tile_width defines subrect width */ + /* `tile_x` here is first sub-rectangle x coord, tile_width defines sub-rectangle width. */ tile_x = renrect->xmin; tile_width = renrect->xmax - tile_x; if (tile_width < 2) { @@ -705,9 +705,9 @@ static void render_endjob(void *rjv) { RenderJob *rj = static_cast<RenderJob *>(rjv); - /* this render may be used again by the sequencer without the active + /* This render may be used again by the sequencer without the active * 'Render' where the callbacks would be re-assigned. assign dummy callbacks - * to avoid referencing freed renderjobs bug T24508. */ + * to avoid referencing freed render-jobs bug T24508. */ RE_InitRenderCB(rj->re); if (rj->main != G_MAIN) { diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc index 263c51f3488..88aed0ae174 100644 --- a/source/blender/editors/render/render_opengl.cc +++ b/source/blender/editors/render/render_opengl.cc @@ -92,7 +92,7 @@ #endif /* TODO(sergey): Find better approximation of the scheduled frames. - * For really highres renders it might fail still. */ + * For really high-resolution renders it might fail still. */ #define MAX_SCHEDULED_FRAMES 8 struct OGLRender { @@ -141,7 +141,7 @@ struct OGLRender { wmWindowManager *wm; wmWindow *win; - /** Use to check if running modal or not (invoke'd or exec'd). */ + /** Use to check if running modal or not (invoked or executed). */ wmTimer *timer; void **movie_ctx_arr; diff --git a/source/blender/editors/render/render_preview.cc b/source/blender/editors/render/render_preview.cc index dc773504807..16e83395401 100644 --- a/source/blender/editors/render/render_preview.cc +++ b/source/blender/editors/render/render_preview.cc @@ -410,8 +410,8 @@ static const char *preview_world_name(const Scene *sce, * material trick to show the floor in the reflections, but hide the floor for camera rays. For * Eevee we use a transparent world that has a projected grid. * - * In the future when Eevee supports vulkan raytracing we can re-evaluate and perhaps remove this - * approximation. + * In the future when Eevee supports VULKAN ray-tracing we can re-evaluate and perhaps remove + * this approximation. */ if (id_type == ID_MA && pr_method == PR_ICON_RENDER && !render_engine_supports_ray_visibility(sce)) { @@ -1424,9 +1424,9 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat iuser.framenr = 1; iuser.scene = sp->scene; - /* elubie: this needs to be changed: here image is always loaded if not + /* NOTE(@elubie): this needs to be changed: here image is always loaded if not * already there. Very expensive for large images. Need to find a way to - * only get existing ibuf */ + * only get existing `ibuf`. */ ibuf = BKE_image_acquire_ibuf(ima, &iuser, nullptr); if (ibuf == nullptr || (ibuf->rect == nullptr && ibuf->rect_float == nullptr)) { BKE_image_release_ibuf(ima, ibuf, nullptr); @@ -1507,7 +1507,7 @@ static void other_id_types_preview_render(IconPreview *ip, /* These types don't use the ShaderPreview mess, they have their own types and functions. */ BLI_assert(!ip->id || !ELEM(GS(ip->id->name), ID_OB)); - /* construct shader preview from image size and previewcustomdata */ + /* Construct shader preview from image size and preview custom-data. */ sp->scene = ip->scene; sp->owner = ip->owner; sp->sizex = cur_size->sizex; diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 95711fe20fa..c6834c84794 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1680,7 +1680,7 @@ static void ed_default_handlers( /* NOTE: add-handler checks if it already exists. */ - /* XXX it would be good to have boundbox checks for some of these... */ + /* XXX: it would be good to have bound-box checks for some of these. */ if (flag & ED_KEYMAP_UI) { wmKeyMap *keymap = WM_keymap_ensure(wm->defaultconf, "User Interface", 0, 0); WM_event_add_keymap_handler(handlers, keymap); diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 8a5d75d5f77..27d19532785 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6567,7 +6567,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) nodeSetActive(ntree, imanode); - /* Connect to first available principled bsdf node. */ + /* Connect to first available principled BSDF node. */ bNode *in_node = ntreeFindType(ntree, SH_NODE_BSDF_PRINCIPLED); bNode *out_node = imanode; diff --git a/source/blender/editors/space_api/spacetypes.c b/source/blender/editors/space_api/spacetypes.c index 035bc7e297d..93d023c8bb4 100644 --- a/source/blender/editors/space_api/spacetypes.c +++ b/source/blender/editors/space_api/spacetypes.c @@ -72,7 +72,7 @@ void ED_spacetypes_init(void) { - /* UI unit is a variable, may be used in some space type inits. */ + /* UI unit is a variable, may be used in some space type initialization. */ U.widget_unit = 20; /* Create space types. */ diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 5a999b1fad7..09daed7e2e7 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -646,7 +646,7 @@ void ED_space_clip_set_mask(bContext *C, SpaceClip *sc, Mask *mask) * \{ */ typedef struct PrefetchJob { - /* Clip into which cache the frames will be prefetched into. */ + /** Clip into which cache the frames will be pre-fetched into. */ MovieClip *clip; /* Local copy of the clip which is used to decouple reading in a way which does not require diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index dad494e6984..52cb36b1b8f 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -297,7 +297,7 @@ static void image_refresh(const bContext *C, ScrArea *area) ima = ED_space_image(sima); BKE_image_user_frame_calc(ima, &sima->iuser, scene->r.cfra); - /* check if we have to set the image from the editmesh */ + /* Check if we have to set the image from the edit-mesh. */ if (ima && (ima->source == IMA_SRC_VIEWER && sima->mode == SI_MODE_MASK)) { if (scene->nodetree) { Mask *mask = ED_space_image_get_mask(sima); diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc index f6802e64049..4834ca3174a 100644 --- a/source/blender/editors/space_node/node_group.cc +++ b/source/blender/editors/space_node/node_group.cc @@ -229,14 +229,14 @@ static bool node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode) Vector<bNode *> nodes_delayed_free; const bNodeTree *ngroup = reinterpret_cast<const bNodeTree *>(gnode->id); - /* wgroup is a temporary copy of the NodeTree we're merging in - * - all of wgroup's nodes are copied across to their new home - * - ngroup (i.e. the source NodeTree) is left unscathed - * - temp copy. do change ID usercount for the copies + /* `wgroup` is a temporary copy of the #NodeTree we're merging in + * - All of wgroup's nodes are copied across to their new home. + * - `ngroup` (i.e. the source NodeTree) is left unscathed. + * - Temp copy. do change ID user-count for the copies. */ bNodeTree *wgroup = ntreeCopyTree(bmain, ngroup); - /* Add the nodes into the ntree */ + /* Add the nodes into the `ntree`. */ LISTBASE_FOREACH_MUTABLE (bNode *, node, &wgroup->nodes) { /* Remove interface nodes. * This also removes remaining links to and from interface nodes. @@ -246,9 +246,8 @@ static bool node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode) nodes_delayed_free.append(node); } - /* keep track of this node's RNA "base" path (the part of the path identifying the node) - * if the old nodetree has animation data which potentially covers this node - */ + /* Keep track of this node's RNA "base" path (the part of the path identifying the node) + * if the old node-tree has animation data which potentially covers this node. */ const char *old_animation_basepath = nullptr; if (wgroup->adt) { PointerRNA ptr; @@ -483,9 +482,8 @@ static bool node_group_separate_selected( newnode = node; } - /* keep track of this node's RNA "base" path (the part of the path identifying the node) - * if the old nodetree has animation data which potentially covers this node - */ + /* Keep track of this node's RNA "base" path (the part of the path identifying the node) + * if the old node-tree has animation data which potentially covers this node. */ if (ngroup.adt) { PointerRNA ptr; char *path; @@ -783,9 +781,8 @@ static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree, /* move nodes over */ LISTBASE_FOREACH_MUTABLE (bNode *, node, &ntree.nodes) { if (node_group_make_use_node(*node, gnode)) { - /* keep track of this node's RNA "base" path (the part of the pat identifying the node) - * if the old nodetree has animation data which potentially covers this node - */ + /* Keep track of this node's RNA "base" path (the part of the pat identifying the node) + * if the old node-tree has animation data which potentially covers this node. */ if (ntree.adt) { PointerRNA ptr; char *path; @@ -995,7 +992,7 @@ static bNode *node_group_make_from_selected(const bContext &C, return nullptr; } - /* new nodetree */ + /* New node-tree. */ bNodeTree *ngroup = ntreeAddTree(bmain, "NodeGroup", ntreetype); /* make group node */ diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index cc8aac21a6e..45899880b41 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -4040,7 +4040,9 @@ static bool lattice_circle_select(ViewContext *vc, return data.is_changed; } -/* NOTE: pose-bone case is copied from editbone case... */ +/** + * \note logic is shared with the edit-bone case, see #armature_circle_doSelectJoint. + */ static bool pchan_circle_doSelectJoint(void *userData, bPoseChannel *pchan, const float screen_co[2]) @@ -4137,6 +4139,9 @@ static bool pose_circle_select(ViewContext *vc, return data.is_changed; } +/** + * \note logic is shared with the pose-bone case, see #pchan_circle_doSelectJoint. + */ static bool armature_circle_doSelectJoint(void *userData, EditBone *ebone, const float screen_co[2], diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 88c01321785..2244f82509f 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -302,7 +302,7 @@ static SeqCollection *extract_standalone_strips(SeqCollection *transformed_strip return collection; } -/* Query strips positioned after left edge of transformed strips boundbox. */ +/* Query strips positioned after left edge of transformed strips bound-box. */ static SeqCollection *query_right_side_strips(ListBase *seqbase, SeqCollection *transformed_strips) { int minframe = MAXFRAME; @@ -351,7 +351,7 @@ static ListBase *seqbase_active_get(const TransInfo *t) return SEQ_active_seqbase_get(ed); } -/* Offset all strips positioned after left edge of transformed strips boundbox by amount equal +/* Offset all strips positioned after left edge of transformed strips bound-box by amount equal * to overlap of transformed strips. */ static void seq_transform_handle_expand_to_fit(TransInfo *t, SeqCollection *transformed_strips) { diff --git a/source/blender/editors/transform/transform_data.h b/source/blender/editors/transform/transform_data.h index 6cfceedb389..a78c2491a1a 100644 --- a/source/blender/editors/transform/transform_data.h +++ b/source/blender/editors/transform/transform_data.h @@ -27,8 +27,8 @@ struct Object; struct bConstraint; #define TRANSDATABASIC \ - /** Extra data (mirrored element pointer, in editmode mesh to BMVert) \ - * (editbone for roll fixing) (...). */ \ + /** Extra data (mirrored element pointer, in edit-mode mesh to #BMVert) \ + * (edit-bone for roll fixing) (...). */ \ void *extra; \ /** Location of the data to transform. */ \ float *loc; \ diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.h b/source/blender/freestyle/intern/stroke/ChainingIterators.h index 93aba258358..66e0c30bea9 100644 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.h +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.h @@ -198,7 +198,7 @@ class ChainingIterator : public ViewEdgeInternal::ViewEdgeIterator { return "ChainingIterator"; } - /** Inits the iterator context. + /** Initializes the iterator context. * This method is called each time a new chain is started. * It can be used to reset some history information that you might want to keep. */ @@ -299,7 +299,7 @@ class ChainSilhouetteIterator : public ChainingIterator { */ virtual int traverse(const AdjacencyIterator &it); - /** Inits the iterator context */ + /** Initializes the iterator context */ virtual int init() { return 0; @@ -406,7 +406,7 @@ class ChainPredicateIterator : public ChainingIterator { */ virtual int traverse(const AdjacencyIterator &it); - /** Inits the iterator context */ + /** Initializes the iterator context. */ virtual int init() { return 0; diff --git a/source/blender/freestyle/intern/winged_edge/WEdge.h b/source/blender/freestyle/intern/winged_edge/WEdge.h index adc08f60ddf..92b8bc70aa8 100644 --- a/source/blender/freestyle/intern/winged_edge/WEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WEdge.h @@ -874,7 +874,7 @@ class WFace { return _VerticesNormals[index]; } - /** Returns the tex coords of the vertex of `index`. */ + /** Returns the texture coords of the vertex of `index`. */ inline Vec2f &GetVertexTexCoords(int index) { return _VerticesTexCoords[index]; @@ -1225,7 +1225,7 @@ class WShape { * orientation and (so) the face orientation. iMaterialIndex The materialIndex for this face * iNormalsList * The list of normals, iNormalsList[i] corresponding to the normal of the vertex - * iVertexList[i] for that face. iTexCoordsList The list of tex coords, iTexCoordsList[i] + * iVertexList[i] for that face. iTexCoordsList The list of texture coords, iTexCoordsList[i] * corresponding to the normal of the vertex iVertexList[i] for that face. */ virtual WFace *MakeFace(vector<WVertex *> &iVertexList, diff --git a/source/blender/freestyle/intern/winged_edge/WXEdge.h b/source/blender/freestyle/intern/winged_edge/WXEdge.h index b335a364365..7ef2e7bcda2 100644 --- a/source/blender/freestyle/intern/winged_edge/WXEdge.h +++ b/source/blender/freestyle/intern/winged_edge/WXEdge.h @@ -783,7 +783,7 @@ class WXShape : public WShape { * The list of normals, iNormalsList[i] * corresponding to the normal of the vertex iVertexList[i] for that face. * - iTexCoordsList: - * The list of tex coords, iTexCoordsList[i] + * The list of texture coords, iTexCoordsList[i] * corresponding to the normal of the vertex iVertexList[i] for that face. */ virtual WFace *MakeFace(vector<WVertex *> &iVertexList, diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index 7b69012dcbc..22cd7eab927 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -56,7 +56,7 @@ ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_ELEMENT_ARRAY) */ typedef enum eGPUBlend { GPU_BLEND_NONE = 0, - /** Premult variants will _NOT_ multiply rgb output by alpha. */ + /** Pre-multiply variants will _NOT_ multiply rgb output by alpha. */ GPU_BLEND_ALPHA, GPU_BLEND_ALPHA_PREMULT, GPU_BLEND_ADDITIVE, diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index f0046e879a0..568462ec2a6 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -65,7 +65,7 @@ extern char datatoc_gpu_shader_common_obinfos_lib_glsl[]; * same for 2 different Materials. Unused GPUPasses are free by Garbage collection. */ -/* Only use one linklist that contains the GPUPasses grouped by hash. */ +/* Only use one linked-list that contains the GPUPasses grouped by hash. */ static GPUPass *pass_cache = NULL; static SpinLock pass_cache_spin; diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 3804f2f0dd1..6451086f5fc 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -84,7 +84,7 @@ struct GPUMaterial { bool has_volume_output; bool has_surface_output; - /* Only used by Eevee to know which bsdf are used. */ + /* Only used by Eevee to know which BSDF are used. */ eGPUMatFlag flag; /* Used by 2.8 pipeline */ @@ -604,7 +604,7 @@ GPUMaterial *GPU_material_from_nodetree(Scene *scene, /* Caller must re-use materials. */ BLI_assert(GPU_material_from_nodetree_find(gpumaterials, engine_type, options) == NULL); - /* HACK: Eevee assume this to create Ghash keys. */ + /* HACK: Eevee assume this to create #GHash keys. */ BLI_assert(sizeof(GPUPass) > 16); /* allocate material */ diff --git a/source/blender/gpu/intern/gpu_state_private.hh b/source/blender/gpu/intern/gpu_state_private.hh index 81d422ff21a..864b7d0446a 100644 --- a/source/blender/gpu/intern/gpu_state_private.hh +++ b/source/blender/gpu/intern/gpu_state_private.hh @@ -62,7 +62,7 @@ union GPUState { uint32_t polygon_smooth : 1; uint32_t line_smooth : 1; }; - /* Here to allow fast bitwise ops. */ + /* Here to allow fast bit-wise ops. */ uint64_t data; }; diff --git a/source/blender/gpu/opengl/gl_state.cc b/source/blender/gpu/opengl/gl_state.cc index bfc691df4b3..c6c013fcf3a 100644 --- a/source/blender/gpu/opengl/gl_state.cc +++ b/source/blender/gpu/opengl/gl_state.cc @@ -377,7 +377,7 @@ void GLStateManager::set_blend(const eGPUBlend value) break; } case GPU_BLEND_ADDITIVE: { - /* Do not let alpha accumulate but premult the source RGB by it. */ + /* Do not let alpha accumulate but pre-multiply the source RGB by it. */ src_rgb = GL_SRC_ALPHA; dst_rgb = GL_ONE; src_alpha = GL_ZERO; diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h index 3ea8ac47f17..890c694d830 100644 --- a/source/blender/imbuf/IMB_colormanagement.h +++ b/source/blender/imbuf/IMB_colormanagement.h @@ -72,7 +72,7 @@ bool IMB_colormanagement_space_name_is_data(const char *name); /** * Convert a float RGB triplet to the correct luminance weighted average. * - * Grayscale, or Luma is a distillation of RGB data values down to a weighted average + * Gray-scale, or Luma is a distillation of RGB data values down to a weighted average * based on the luminance positions of the red, green, and blue primaries. * Given that the internal reference space may be arbitrarily set, any * effort to glean the luminance coefficients must be aware of the reference diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c index 1223033f535..758b21f8cda 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.c +++ b/source/blender/imbuf/intern/cineon/cineonlib.c @@ -239,13 +239,13 @@ LogImageFile *cineonOpen(const unsigned char *byteStuff, int fromMemory, size_t } if (cineon->depth == 1) { - /* Grayscale image */ + /* Gray-scale image. */ cineon->element[0].descriptor = descriptor_Luminance; cineon->element[0].transfer = transfer_Linear; cineon->element[0].depth = 1; } else if (cineon->depth == 3) { - /* RGB image */ + /* RGB image. */ if (cineon->numElements == 1) { cineon->element[0].descriptor = descriptor_RGB; cineon->element[0].transfer = transfer_PrintingDensity; diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 4841f7b5039..ff86fbfdd38 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -824,7 +824,7 @@ void IMB_float_from_rect(ImBuf *ibuf) /** \} */ /* -------------------------------------------------------------------- */ -/** \name Color to Grayscale +/** \name Color to Gray-Scale * \{ */ void IMB_color_to_bw(ImBuf *ibuf) diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index dc714e6e85a..1c8548009e8 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -536,7 +536,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors } } else if (image.zsize == 2) { - /* grayscale with alpha */ + /* Gray-scale with alpha. */ rect = (uchar *)ibuf->rect; for (size_t x = (size_t)ibuf->x * (size_t)ibuf->y; x > 0; x--) { rect[0] = rect[2]; @@ -564,7 +564,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors } } else if (image.zsize == 2) { - /* grayscale with alpha */ + /* Gray-scale with alpha. */ fbase = ibuf->rect_float; for (size_t x = (size_t)ibuf->x * (size_t)ibuf->y; x > 0; x--) { fbase[0] = fbase[2]; diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index 83e93f16f1b..3af7367ef6e 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -424,13 +424,13 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, h = image->comps[0].h; switch (image->numcomps) { - case 1: /* Grayscale */ - case 3: /* Color */ + case 1: /* Gray-scale. */ + case 3: /* Color. */ planes = 24; use_alpha = false; break; - default: /* 2 or 4 - Grayscale or Color + alpha */ - planes = 32; /* grayscale + alpha */ + default: /* 2 or 4 - Gray-scale or Color + alpha. */ + planes = 32; /* Gray-scale + alpha. */ use_alpha = true; break; } @@ -529,7 +529,7 @@ static ImBuf *imb_load_jp2_stream(opj_stream_t *stream, r = image->comps[0].data; a = (use_alpha) ? image->comps[1].data : NULL; - /* grayscale */ + /* Gray-scale. */ if (use_alpha) { a = image->comps[3].data; PIXEL_LOOPER_BEGIN (rect_uchar) { @@ -891,8 +891,8 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) prec = 8; } - /* 32bit images == alpha channel */ - /* grayscale not supported yet */ + /* 32bit images == alpha channel. */ + /* Gray-scale not supported yet. */ numcomps = (ibuf->planes == 32) ? 4 : 3; } diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 6ad373845fc..1d3589f00a6 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -29,7 +29,7 @@ * high-level routine that loads all images as 32-bit RGBA, handling all the * required conversions between many different TIFF types internally. * - * Saving supports RGB, RGBA and BW (grayscale) images correctly, with + * Saving supports RGB, RGBA and BW (gray-scale) images correctly, with * 8 bits per channel in all cases. The "deflate" compression algorithm is * used to compress images. */ @@ -488,7 +488,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image) if (chan == 3 && spp == 3) { /* fill alpha if only RGB TIFF */ copy_vn_fl(fbuf, ibuf->x, 1.0f); } - else if (chan >= spp) { /* for grayscale, duplicate first channel into G and B */ + else if (chan >= spp) { /* For gray-scale, duplicate first channel into G and B. */ success |= TIFFReadScanline(image, fbuf, row, 0); } else { @@ -500,7 +500,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image) if (chan == 3 && spp == 3) { /* fill alpha if only RGB TIFF */ copy_vn_ushort(sbuf, ibuf->x, 65535); } - else if (chan >= spp) { /* for grayscale, duplicate first channel into G and B */ + else if (chan >= spp) { /* For gray-scale, duplicate first channel into G and B. */ success |= TIFFReadScanline(image, fbuf, row, 0); } else { @@ -848,7 +848,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags) TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); } else if (samplesperpixel == 1) { - /* grayscale images, 1 channel */ + /* Gray-scale images, 1 channel */ TIFFSetField(image, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); } diff --git a/source/blender/io/alembic/intern/abc_reader_curves.h b/source/blender/io/alembic/intern/abc_reader_curves.h index 6bc0691a870..4cfb50ac59e 100644 --- a/source/blender/io/alembic/intern/abc_reader_curves.h +++ b/source/blender/io/alembic/intern/abc_reader_curves.h @@ -45,8 +45,8 @@ class AbcCurveReader final : public AbcObjectReader { void readObjectData(Main *bmain, const Alembic::Abc::ISampleSelector &sample_sel) override; /** * \note Alembic only stores data about control points, but the Mesh - * passed from the cache modifier contains the displist, which has more data - * than the control points, so to avoid corrupting the displist we modify the + * passed from the cache modifier contains the #DispList, which has more data + * than the control points, so to avoid corrupting the #DispList we modify the * object directly and create a new Mesh from that. Also we might need to * create new or delete existing NURBS in the curve. */ diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc index d92d1c5ad48..8c4ae7e111e 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc @@ -189,7 +189,7 @@ void OBJWriter::write_vertex_coords(const OBJMesh &obj_mesh_data) const } /** - * Write UV vertex coordinates for all vertices as "vt u v". + * Write UV vertex coordinates for all vertices as `vt u v`. * \note UV indices are stored here, but written later. */ void OBJWriter::write_uv_coords(OBJMesh &r_obj_mesh_data) const @@ -430,7 +430,7 @@ void OBJWriter::write_nurbs_curve(const OBJCurve &obj_nurbs_data) const file_handler_->write<eOBJSyntaxElement::curve_element_end>(); /** - * In "parm u 0 0.1 .." line:, (total control points + 2) equidistant numbers in the + * In `parm u 0 0.1 ..` line:, (total control points + 2) equidistant numbers in the * parameter range are inserted. */ file_handler_->write<eOBJSyntaxElement::nurbs_parameter_begin>(); @@ -584,9 +584,9 @@ void MTLWriter::write_materials() } /** - * Add the materials of the given object to MTLWriter, deduping + * Add the materials of the given object to #MTLWriter, de-duplicating * against ones that are already there. - * Return a Vector of indices into mtlmaterials_ that hold the MTLMaterial + * Return a Vector of indices into mtlmaterials_ that hold the #MTLMaterial * that corresponds to each material slot, in order, of the given Object. * Indexes are returned rather than pointers to the MTLMaterials themselves * because the mtlmaterials_ Vector may move around when resized. diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh index 83571d8aa46..6d0ff1aa6a5 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh @@ -301,7 +301,7 @@ template<eFileType filetype> class FileHandler : NonCopyable, NonMovable { template<typename T> using remove_cvref_t = std::remove_cv_t<std::remove_reference_t<T>>; /** - * Make #std::string etc., usable for fprintf-family. + * Make #std::string etc., usable for `fprintf` family. * \return: `const char *` or the original argument if the argument is * not related to #std::string. */ diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh index d72dd76d447..92fea78732a 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh @@ -36,13 +36,13 @@ #include "IO_wavefront_obj.h" namespace blender::io::obj { -/* Denote absence for usually non-negative numbers. */ +/** Denote absence for usually non-negative numbers. */ const int NOT_FOUND = -1; -/* Any negative number other than `NOT_FOUND` to initialise usually non-negative numbers. */ +/** Any negative number other than `NOT_FOUND` to initialize usually non-negative numbers. */ const int NEGATIVE_INIT = -10; /** - * #std::unique_ptr deleter for BMesh. + * #std::unique_ptr than handles freeing #BMesh. */ struct CustomBMeshDeleter { void operator()(BMesh *bmesh) diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc index b60f8976177..b99d41e0c72 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_mtl.cc @@ -192,7 +192,7 @@ static void store_bsdf_properties(const nodes::NodeRef *bsdf_node, if (bnode) { copy_property_from_node(SOCK_FLOAT, bnode, "Roughness", {&roughness, 1}); } - /* Emperical approximation. Importer should use the inverse of this method. */ + /* Empirical approximation. Importer should use the inverse of this method. */ float spec_exponent = (1.0f - roughness) * 30; spec_exponent *= spec_exponent; @@ -230,7 +230,7 @@ static void store_bsdf_properties(const nodes::NodeRef *bsdf_node, } mul_v3_fl(emission_col, emission_strength); - /* See https://wikipedia.org/wiki/Wavefront_.obj_file for all possible values of illum. */ + /* See https://wikipedia.org/wiki/Wavefront_.obj_file for all possible values of `illum`. */ /* Highlight on. */ int illum = 2; if (specular == 0.0f) { @@ -268,7 +268,7 @@ static void store_bsdf_properties(const nodes::NodeRef *bsdf_node, } /** - * Store image texture options and filepaths in r_mtl_mat. + * Store image texture options and file-paths in `r_mtl_mat`. */ static void store_image_textures(const nodes::NodeRef *bsdf_node, const nodes::NodeTreeRef *node_tree, @@ -292,7 +292,7 @@ static void store_image_textures(const nodes::NodeRef *bsdf_node, const bNode *normal_map_node{nullptr}; if (texture_map.key == eMTLSyntaxElement::map_Bump) { - /* Find sockets linked to destination "Normal" socket in p-bsdf node. */ + /* Find sockets linked to destination "Normal" socket in P-BSDF node. */ linked_sockets_to_dest_id(bnode, *node_tree, "Normal", linked_sockets); /* Among the linked sockets, find Normal Map shader node. */ normal_map_node = get_node_of_type(linked_sockets, SH_NODE_NORMAL_MAP); @@ -308,7 +308,7 @@ static void store_image_textures(const nodes::NodeRef *bsdf_node, } } else { - /* Find sockets linked to the destination socket of interest, in p-bsdf node. */ + /* Find sockets linked to the destination socket of interest, in P-BSDF node. */ linked_sockets_to_dest_id( bnode, *node_tree, texture_map.value.dest_socket_id, linked_sockets); } diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh index def70eff0ee..4baf1df51f5 100644 --- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh +++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.hh @@ -20,7 +20,7 @@ using array_float_3 = std::array<float, 3>; /** * This matches #OBJCurve's member functions, except that all the numbers and names are known - * constants. Used to store expected values of NURBS Curve sobjects. + * constants. Used to store expected values of NURBS curves objects. */ class NurbsObject { private: diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 8e7551e1703..82b20483902 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -468,7 +468,7 @@ typedef enum eRotationModes { typedef struct bPose { /** List of pose channels, PoseBones in RNA. */ ListBase chanbase; - /** Ghash for quicker string lookups. */ + /** Use a hash-table for quicker string lookups. */ struct GHash *chanhash; /* Flat array of pose channels. It references pointers from diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 5dbed6b4d24..bd9f9d8ec3d 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -348,7 +348,7 @@ typedef enum eDriverTarget_Flag { /** idtype can only be 'Object' */ DTAR_FLAG_ID_OB_ONLY = (1 << 1), - /* "localspace" flags */ + /* "local-space" flags. */ /** base flag - basically "pre parent+constraints" */ DTAR_FLAG_LOCALSPACE = (1 << 2), /** include constraints transformed to space including parents */ diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h index 3b65378f9eb..566ffd19669 100644 --- a/source/blender/makesdna/DNA_armature_types.h +++ b/source/blender/makesdna/DNA_armature_types.h @@ -124,11 +124,11 @@ typedef struct bArmature { ListBase bonebase; - /** Ghash for quicker lookups of bones by name. */ + /** Use a hash-table for quicker lookups of bones by name. */ struct GHash *bonehash; void *_pad1; - /** Editbone listbase, we use pointer so we can check state. */ + /** #EditBone list (use an allocated pointer so the state can be checked). */ ListBase *edbo; /* active bones should work like active object where possible diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 634ebdff253..4976168a890 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -123,7 +123,7 @@ typedef struct BrushGpencilSettings { int sculpt_mode_flag; /** Preset type (used to reset brushes - internal). */ short preset_type; - /** Brush preselected mode (Active/Material/Vertexcolor). */ + /** Brush preselected mode (Active/Material/Vertex-color). */ short brush_draw_mode; /** Randomness for Hue. */ diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 67cd68afb8a..5d682d963ab 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -293,7 +293,7 @@ typedef struct Material { /* #define TEXCO_STRESS (1 << 14) */ /* deprecated */ /* #define TEXCO_SPEED (1 << 15) */ /* deprecated */ -/* mapto */ +/** #MTex.mapto */ #define MAP_COL (1 << 0) #define MAP_ALPHA (1 << 7) diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index e349dfd8704..becc2d290f7 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -307,7 +307,7 @@ typedef struct bNode { char _pad1[4]; - /** Entire boundbox (world-space). */ + /** Entire bound-box (world-space). */ rctf totr; /** Optional preview area. */ rctf prvr; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 13a368e4263..5cce7ec5f67 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -152,7 +152,7 @@ typedef struct Object_Runtime { /** Start time of the mode transfer overlay animation. */ double overlay_mode_transfer_start_time; - /** Axis aligned boundbox (in localspace). */ + /** Axis aligned bound-box (in local-space). */ struct BoundBox *bb; /** diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 4607a47a9a8..a491e131d71 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1341,8 +1341,10 @@ typedef struct SequencerToolSettings { short snap_flag; /* eSeqOverlapMode */ int overlap_mode; - /** When there are many snap points, 0-1 range corresponds to resolution from boundbox to all - * possible snap points. */ + /** + * When there are many snap points, + * 0-1 range corresponds to resolution from bound-box to all possible snap points. + */ int snap_distance; int pivot_point; } SequencerToolSettings; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 5a98277531c..5981d20cc38 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -986,7 +986,7 @@ enum eFileDetails { */ #define FILE_SELECT_MAX_RECURSIONS (FILE_MAX_LIBEXTRA / 2) -/** Filesel types. */ +/** File selector types. */ typedef enum eFileSelectType { FILE_LOADLIB = 1, FILE_MAIN = 2, @@ -1000,7 +1000,7 @@ typedef enum eFileSelectType { FILE_SPECIAL = 9, } eFileSelectType; -/** filesel op property -> action. */ +/** File-selector op property -> action. */ typedef enum eFileSel_Action { FILE_OPENFILE = 0, FILE_SAVE = 1, @@ -1755,7 +1755,7 @@ typedef struct SpaceClip { */ float stabmat[4][4], unistabmat[4][4]; - /* movie postprocessing */ + /** Movie postprocessing. */ int postproc_flag; /* grease pencil */ diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 5f4353b6f3a..ae95f58d4f0 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -419,7 +419,7 @@ enum { RV3D_LOCK_ANY_TRANSFORM = (RV3D_LOCK_LOCATION | RV3D_LOCK_ROTATION | RV3D_LOCK_ZOOM_AND_DOLLY), }; -/* Bitwise OR of the regular lock-flags with runtime only lock-flags. */ +/** Bit-wise OR of the regular lock-flags with runtime only lock-flags. */ #define RV3D_LOCK_FLAGS(rv3d) ((rv3d)->viewlock | ((rv3d)->runtime_viewlock)) /** #RegionView3D.viewlock_quad */ diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index bdf29b22787..6322cb459dd 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -1127,7 +1127,7 @@ static void reconstruct_structs(const DNA_ReconstructInfo *reconstruct_info, * * \param reconstruct_info: Preprocessed reconstruct information generated by * #DNA_reconstruct_info_create. - * \param new_struct_nr: Index in newsdna->structs of the struct that is being reconstructed. + * \param new_struct_nr: Index in `newsdna->structs` of the struct that is being reconstructed. * \param old_block: Memory buffer containing the old struct. * \param new_block: Where to put converted struct contents. */ diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index d880c892aa9..2d499dd113f 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -265,7 +265,8 @@ typedef enum PropertyFlag { * This is crucial information for processes that walk the whole data of an ID e.g. * (like library override). * Note that all ID pointers are enforced to this by default, - * this probably will need to be rechecked (see ugly infamous NodeTrees of mat/tex/scene/etc.). + * this probably will need to be rechecked + * (see ugly infamous node-trees of material/texture/scene/etc.). */ PROP_PTR_NO_OWNERSHIP = (1 << 7), diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 7a934443907..28e50e80f32 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -993,7 +993,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) RNA_def_property_update(prop, 0, "rna_Armature_update_data"); } RNA_def_property_float_sdna(prop, NULL, "rad_head"); - /* XXX range is 0 to lim, where lim = 10000.0f * MAX2(1.0, view3d->grid); */ + /* XXX range is 0 to limit, where limit = 10000.0f * MAX2(1.0, view3d->grid); */ // RNA_def_property_range(prop, 0, 1000); RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3); RNA_def_property_ui_text( @@ -1007,7 +1007,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone) RNA_def_property_update(prop, 0, "rna_Armature_update_data"); } RNA_def_property_float_sdna(prop, NULL, "rad_tail"); - /* XXX range is 0 to lim, where lim = 10000.0f * MAX2(1.0, view3d->grid); */ + /* XXX range is 0 to limit, where limit = 10000.0f * MAX2(1.0, view3d->grid); */ // RNA_def_property_range(prop, 0, 1000); RNA_def_property_ui_range(prop, 0.01, 100, 0.1, 3); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c index a02f55667e3..7d165ce045d 100644 --- a/source/blender/makesrna/intern/rna_armature_api.c +++ b/source/blender/makesrna/intern/rna_armature_api.c @@ -119,7 +119,7 @@ void RNA_api_armature_edit_bone(StructRNA *srna) func = RNA_def_function(srna, "align_roll", "rna_EditBone_align_roll"); RNA_def_function_ui_description(func, - "Align the bone to a localspace roll so the Z axis " + "Align the bone to a local-space roll so the Z axis " "points in the direction of the vector given"); parm = RNA_def_float_vector( func, "vector", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 6cca0c51988..86ed0f307c4 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -453,8 +453,8 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, Object *ob = (Object *)value.data; if (ob) { - /* if bevel object has got the save curve, as object, for which it's */ - /* set as bevobj, there could be infinity loop in displist calculation */ + /* If bevel object has got the save curve, as object, for which it's set as bevobj, + * there could be infinity loop in #DispList calculation. */ if (ob->type == OB_CURVE && ob->data != cu) { cu->bevobj = ob; id_lib_extern((ID *)ob); @@ -528,8 +528,8 @@ static void rna_Curve_taperObject_set(PointerRNA *ptr, Object *ob = (Object *)value.data; if (ob) { - /* if taper object has got the save curve, as object, for which it's */ - /* set as bevobj, there could be infinity loop in displist calculation */ + /* If taper object has got the save curve, as object, for which it's set as bevobj, + * there could be infinity loop in #DispList calculation. */ if (ob->type == OB_CURVE && ob->data != cu) { cu->taperobj = ob; id_lib_extern((ID *)ob); diff --git a/source/blender/makesrna/intern/rna_light.c b/source/blender/makesrna/intern/rna_light.c index 8bec337885e..003eebd8cc8 100644 --- a/source/blender/makesrna/intern/rna_light.c +++ b/source/blender/makesrna/intern/rna_light.c @@ -360,7 +360,7 @@ static void rna_def_light_shadow(StructRNA *srna, bool sun) RNA_def_property_boolean_sdna(prop, NULL, "mode", LA_SHAD_CONTACT); RNA_def_property_ui_text(prop, "Contact Shadow", - "Use screen space raytracing to have correct shadowing " + "Use screen space ray-tracing to have correct shadowing " "near occluder, or for small features that does not appear " "in shadow maps"); RNA_def_property_update(prop, 0, "rna_Light_update"); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index c6c7341bcc6..2cda19737da 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -7073,7 +7073,7 @@ static void rna_def_scene_eevee(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); prop = RNA_def_property(srna, "ssr_quality", PROP_FLOAT, PROP_FACTOR); - RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the screen space raytracing"); + RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the screen space ray-tracing"); RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc index 6b79c9e0f68..21ad8dd5bbc 100644 --- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc +++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc @@ -891,7 +891,7 @@ class GeometryNodesEvaluator { void foreach_non_lazy_input(LockedNode &locked_node, FunctionRef<void(DInputSocket socket)> fn) { if (node_supports_laziness(locked_node.node)) { - /* In the future only some of the inputs may support lazyness. */ + /* In the future only some of the inputs may support laziness. */ return; } /* Nodes that don't support laziness require all inputs. */ diff --git a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc index ed4def0cf68..03fd9ac051e 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_dual_mesh.cc @@ -554,7 +554,7 @@ static bool vertex_needs_dissolving(const int vertex, /** * Finds 'normal' vertices which are connected to only two polygons and marks them to not be - * used in the datastructures derived from the mesh. For each pair of polygons which has such a + * used in the data-structures derived from the mesh. For each pair of polygons which has such a * vertex, an edge is created for the dual mesh between the centers of those two polygons. All * edges in the input mesh which contain such a vertex are marked as 'done' to prevent duplicate * edges being created. (See T94144) @@ -703,7 +703,7 @@ static void calc_dual_mesh(GeometrySet &geometry_set, * exactly one edge in the original, we can use this array to keep track of whether it still * needs to be created or not. If it's not -1 it gives the index in `new_edges` of the dual * edge. The edges coming from preserving the boundaries only get added once anyway, so we - * don't need a hashmap for that. */ + * don't need a hash-map for that. */ Array<int> old_to_new_edges_map(mesh_in.totedge); old_to_new_edges_map.fill(-1); diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc index 1552ed9f19c..0fa977aa63c 100644 --- a/source/blender/nodes/shader/node_shader_tree.cc +++ b/source/blender/nodes/shader/node_shader_tree.cc @@ -845,7 +845,7 @@ static bool ntree_tag_bsdf_cb(bNode *fromnode, bNode *UNUSED(tonode), void *user default: /* We could return false here but since we * allow the use of Closure as RGBA, we can have - * Bsdf nodes linked to other Bsdf nodes. */ + * BSDF nodes linked to other BSDF nodes. */ break; } @@ -972,8 +972,8 @@ bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree) exec = ntreeShaderBeginExecTree_internal(&context, ntree, NODE_INSTANCE_KEY_BASE); - /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes, - * which only store the ntree pointer. Should be fixed at some point! + /* XXX: this should not be necessary, but is still used for compositor/shader/texture nodes, + * which only store the `ntree` pointer. Should be fixed at some point! */ ntree->execdata = exec; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc index 56e42708e93..30ec746c2d0 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.cc @@ -220,7 +220,7 @@ void register_node_type_sh_tex_sky() node_type_init(&ntype, file_ns::node_shader_init_tex_sky); node_type_storage(&ntype, "NodeTexSky", node_free_standard_storage, node_copy_standard_storage); node_type_gpu(&ntype, file_ns::node_shader_gpu_tex_sky); - /* remove Vector input for Nishita */ + /* Remove vector input for Nishita sky model. */ node_type_update(&ntype, file_ns::node_shader_update_sky); nodeRegisterType(&ntype); diff --git a/source/blender/render/RE_pipeline.h b/source/blender/render/RE_pipeline.h index 073bb0a3697..bf7d41b97b2 100644 --- a/source/blender/render/RE_pipeline.h +++ b/source/blender/render/RE_pipeline.h @@ -461,8 +461,6 @@ void RE_GetCameraWindow(struct Render *re, struct Object *camera, float mat[4][4 void RE_GetCameraWindowWithOverscan(struct Render *re, float overscan, float r_winmat[4][4]); void RE_GetCameraModelMatrix(struct Render *re, struct Object *camera, float r_modelmat[4][4]); -/* displist.c utility. */ - struct Scene *RE_GetScene(struct Render *re); void RE_SetScene(struct Render *re, struct Scene *sce); diff --git a/source/blender/render/intern/render_result.c b/source/blender/render/intern/render_result.c index 5455b2d883a..d207ea0a38e 100644 --- a/source/blender/render/intern/render_result.c +++ b/source/blender/render/intern/render_result.c @@ -1238,7 +1238,7 @@ ImBuf *render_result_rect_to_ibuf(RenderResult *rr, const RenderData *rd, const } } - /* color -> grayscale */ + /* Color -> gray-scale. */ /* editing directly would alter the render view */ if (rd->im_format.planes == R_IMF_PLANES_BW) { ImBuf *ibuf_bw = IMB_dupImBuf(ibuf); diff --git a/source/blender/render/intern/render_types.h b/source/blender/render/intern/render_types.h index ca4f72350e1..e5d766acf8d 100644 --- a/source/blender/render/intern/render_types.h +++ b/source/blender/render/intern/render_types.h @@ -106,7 +106,7 @@ struct Render { struct RenderEngine *engine; /* NOTE: This is a minimal dependency graph and evaluated scene which is enough to access view - * layer visibility and use for post-precessing (compositor and sequencer). */ + * layer visibility and use for postprocessing (compositor and sequencer). */ Depsgraph *pipeline_depsgraph; Scene *pipeline_scene_eval; diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 371e4b7becd..9f4e07820fa 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -303,9 +303,9 @@ int seq_get_shown_sequences(ListBase *seqbase, /** \} */ /* -------------------------------------------------------------------- */ -/** \name Preprocessing and Effects +/** \name Preprocessing & Effects * - * Input pre-processing for SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP and SEQ_TYPE_SCENE. + * Input preprocessing for SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP and SEQ_TYPE_SCENE. * * Do all the things you can't really do afterwards using sequence effects * (read: before re-scaling to render resolution has been done). diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h index 497e4f6e5fc..8691ebe06ec 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h @@ -199,7 +199,7 @@ void WM_gizmotype_append_ptr(void (*gtfunc)(struct wmGizmoType *, void *), void bool WM_gizmotype_remove(struct bContext *C, struct Main *bmain, const char *idname); void WM_gizmotype_remove_ptr(struct bContext *C, struct Main *bmain, struct wmGizmoType *gzt); /** - * Free but don't remove from ghash. + * Free but don't remove from #GHash. */ void WM_gizmotype_free_ptr(struct wmGizmoType *gzt); /** diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 1d3fa158ac1..99bab3ae23d 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -263,7 +263,7 @@ static void wm_window_substitute_old(wmWindowManager *oldwm, win->eventstate = oldwin->eventstate; oldwin->eventstate = NULL; - /* ensure proper screen rescaling */ + /* Ensure proper screen re-scaling. */ win->sizex = oldwin->sizex; win->sizey = oldwin->sizey; win->posx = oldwin->posx; |