From 6d1d1bf2b12092e9f6c435c38e1bb84f3798ac5a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Sep 2022 09:41:31 +1000 Subject: Cleanup: spelling in comments Also add missing task ID. --- source/blender/blenkernel/BKE_lib_override.h | 2 +- source/blender/blenkernel/intern/blendfile_link_append.c | 6 +++--- source/blender/blenkernel/intern/fcurve.c | 2 +- source/blender/blenlib/BLI_convexhull_2d.h | 2 +- source/blender/blenloader/intern/readblenentry.cc | 4 ++-- source/blender/blenloader/intern/readfile.cc | 8 ++++---- source/blender/draw/intern/draw_debug.cc | 4 ++-- source/blender/editors/object/object_relations.c | 2 +- source/blender/editors/space_file/filelist.cc | 4 ++-- source/blender/editors/space_view3d/view3d_draw.cc | 2 +- source/blender/gpu/GPU_shader.h | 3 ++- source/blender/makesdna/DNA_ID.h | 2 +- source/blender/makesdna/DNA_scene_types.h | 6 ++++-- source/blender/makesdna/DNA_sequence_types.h | 2 +- 14 files changed, 26 insertions(+), 23 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_lib_override.h b/source/blender/blenkernel/BKE_lib_override.h index 8542c02fab5..963e2d09b17 100644 --- a/source/blender/blenkernel/BKE_lib_override.h +++ b/source/blender/blenkernel/BKE_lib_override.h @@ -117,7 +117,7 @@ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain, /** * Create overridden local copies of all tagged data-blocks in given Main. * - * \note Set `id->newid` of overridden libs with newly created overrides, + * \note Set `id->newid` of overridden libraries with newly created overrides, * caller is responsible to clean those pointers before/after usage as needed. * * \note By default, it will only remap newly created local overriding data-blocks between diff --git a/source/blender/blenkernel/intern/blendfile_link_append.c b/source/blender/blenkernel/intern/blendfile_link_append.c index e3b76122ff0..394469e19a4 100644 --- a/source/blender/blenkernel/intern/blendfile_link_append.c +++ b/source/blender/blenkernel/intern/blendfile_link_append.c @@ -61,7 +61,7 @@ static CLG_LogRef LOG = {"bke.blendfile_link_append"}; typedef struct BlendfileLinkAppendContextItem { /** Name of the ID (without the heading two-chars IDcode). */ char *name; - /** All libs (from BlendfileLinkAppendContext.libraries) to try to load this ID from. */ + /** All libraries (from #BlendfileLinkAppendContext.libraries) to try to load this ID from. */ BLI_bitmap *libraries; /** ID type. */ short idcode; @@ -1258,7 +1258,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re } /* For each lib file, we try to link all items belonging to that lib, - * and tag those successful to not try to load them again with the other libs. */ + * and tag those successful to not try to load them again with the other libraries. */ for (item_idx = 0, itemlink = lapp_context->items.list; itemlink; item_idx++, itemlink = itemlink->next) { BlendfileLinkAppendContextItem *item = itemlink->link; @@ -1272,7 +1272,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re mainl, &blo_handle, item->idcode, item->name, lapp_context->params); if (new_id) { - /* If the link is successful, clear item's libs 'todo' flags. + /* If the link is successful, clear item's libraries 'todo' flags. * This avoids trying to link same item with other libraries to come. */ BLI_bitmap_set_all(item->libraries, false, lapp_context->num_libraries); item->new_id = new_id; diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 4b91efff08d..beea3217126 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -2382,7 +2382,7 @@ void BKE_fcurve_blend_write(BlendWriter *writer, ListBase *fcurves) void BKE_fcurve_blend_read_data(BlendDataReader *reader, ListBase *fcurves) { - /* link F-Curve data to F-Curve again (non ID-libs) */ + /* Link F-Curve data to F-Curve again (non ID-libraries). */ LISTBASE_FOREACH (FCurve *, fcu, fcurves) { /* curve data */ BLO_read_data_address(reader, &fcu->bezt); diff --git a/source/blender/blenlib/BLI_convexhull_2d.h b/source/blender/blenlib/BLI_convexhull_2d.h index f4e4e4d66f1..044c1da6925 100644 --- a/source/blender/blenlib/BLI_convexhull_2d.h +++ b/source/blender/blenlib/BLI_convexhull_2d.h @@ -18,7 +18,7 @@ extern "C" { * \param r_points: An array of the convex hull vertex indices (max is n). * \return The number of indices in r_points. * - * \note Performance is O(n.log(n)), same as qsort. + * \note Performance is `O(n.log(n))`, same as `qsort`. * */ int BLI_convexhull_2d(const float (*points)[2], int n, int r_points[/* n */]); diff --git a/source/blender/blenloader/intern/readblenentry.cc b/source/blender/blenloader/intern/readblenentry.cc index e3d6864b962..55d86371efe 100644 --- a/source/blender/blenloader/intern/readblenentry.cc +++ b/source/blender/blenloader/intern/readblenentry.cc @@ -434,8 +434,8 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, * but oldmain itself shall *never* be 'transferred' to new mainlist! */ BLI_assert(old_mainlist.first == oldmain); - /* That way, libs (aka mains) we did not reuse in new undone/redone state - * will be cleared together with oldmain... */ + /* That way, libraries (aka mains) we did not reuse in new undone/redone state + * will be cleared together with `oldmain`. */ blo_join_main(&old_mainlist); blo_filedata_free(fd); diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 46ae207db48..7c07d373999 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -2261,7 +2261,7 @@ void blo_do_versions_key_uidgen(Key *key) #ifdef USE_SETSCENE_CHECK /** - * A version of #BKE_scene_validate_setscene with special checks for linked libs. + * A version of #BKE_scene_validate_setscene with special checks for linked libraries. */ static bool scene_validate_setscene__liblink(Scene *sce, const int totscene) { @@ -2904,7 +2904,7 @@ static void fix_relpaths_library(const char *basepath, Main *main) else { LISTBASE_FOREACH (Library *, lib, &main->libraries) { /* Libraries store both relative and abs paths, recreate relative paths, - * relative to the blend file since indirectly linked libs will be + * relative to the blend file since indirectly linked libraries will be * relative to their direct linked library. */ if (BLI_path_is_rel(lib->filepath)) { /* if this is relative to begin with? */ BLI_strncpy(lib->filepath, lib->filepath_abs, sizeof(lib->filepath)); @@ -3151,7 +3151,7 @@ static bool read_libblock_is_identical(FileData *fd, BHead *bhead) /* For undo, restore matching library datablock from the old main. */ static bool read_libblock_undo_restore_library(FileData *fd, Main *main, const ID *id) { - /* In undo case, most libs and linked data should be kept as is from previous state + /* In undo case, most libraries and linked data should be kept as is from previous state * (see BLO_read_from_memfile). * However, some needed by the snapshot being read may have been removed in previous one, * and would go missing. @@ -4586,7 +4586,7 @@ static void library_link_end(Main *mainl, FileData **fd, const int flag) /* make main consistent */ BLO_expand_main(*fd, mainl); - /* do this when expand found other libs */ + /* Do this when expand found other libraries. */ read_libraries(*fd, (*fd)->mainlist); curlib = mainl->curlib; diff --git a/source/blender/draw/intern/draw_debug.cc b/source/blender/draw/intern/draw_debug.cc index 811185395fd..681ca8e36d1 100644 --- a/source/blender/draw/intern/draw_debug.cc +++ b/source/blender/draw/intern/draw_debug.cc @@ -319,8 +319,8 @@ template<> void DebugDraw::print_value(const uint4 &value) /* -------------------------------------------------------------------- */ /** \name Internals * - * IMPORTANT: All of these are copied from the shader libs (common_debug_draw_lib.glsl & - * common_debug_print_lib.glsl). They need to be kept in sync to write the same data. + * IMPORTANT: All of these are copied from the shader libraries (`common_debug_draw_lib.glsl` & + * `common_debug_print_lib.glsl`). They need to be kept in sync to write the same data. * \{ */ void DebugDraw::draw_line(float3 v1, float3 v2, uint color) diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 4a523997473..21e56531096 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2214,7 +2214,7 @@ static int make_local_exec(bContext *C, wmOperator *op) CTX_DATA_END; } - BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libs */ + BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libraries. */ WM_event_add_notifier(C, NC_WINDOW, NULL); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_file/filelist.cc b/source/blender/editors/space_file/filelist.cc index 8ad998e2124..1eb67da0347 100644 --- a/source/blender/editors/space_file/filelist.cc +++ b/source/blender/editors/space_file/filelist.cc @@ -388,7 +388,7 @@ static int compare_direntry_generic(const FileListInternEntry *entry1, if (entry1->typeflag & FILE_TYPE_DIR) { if (entry2->typeflag & FILE_TYPE_DIR) { /* If both entries are tagged as dirs, we make a 'sub filter' that shows first the real dirs, - * then libs (.blend files), then categories in libs. */ + * then libraries (.blend files), then categories in libraries. */ if (entry1->typeflag & FILE_TYPE_BLENDERLIB) { if (!(entry2->typeflag & FILE_TYPE_BLENDERLIB)) { return 1; @@ -2922,7 +2922,7 @@ static int filelist_readjob_list_dir(const char *root, if (!(entry->typeflag & FILE_TYPE_DIR)) { if (do_lib && BLO_has_bfile_extension(target)) { - /* If we are considering .blend files as libs, promote them to directory status. */ + /* If we are considering .blend files as libraries, promote them to directory status. */ entry->typeflag = FILE_TYPE_BLENDER; /* prevent current file being used as acceptable dir */ if (BLI_path_cmp(main_name, target) != 0) { diff --git a/source/blender/editors/space_view3d/view3d_draw.cc b/source/blender/editors/space_view3d/view3d_draw.cc index 792421ef4b9..9686609fa65 100644 --- a/source/blender/editors/space_view3d/view3d_draw.cc +++ b/source/blender/editors/space_view3d/view3d_draw.cc @@ -2246,7 +2246,7 @@ void view3d_depths_rect_create(ARegion *region, rcti *rect, ViewDepths *r_d) } } -/* NOTE: with nouveau drivers the glReadPixels() is very slow. T24339. */ +/* NOTE: with NOUVEAU drivers the #glReadPixels() is very slow. T24339. */ static ViewDepths *view3d_depths_create(ARegion *region) { ViewDepths *d = MEM_cnew("ViewDepths"); diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index c1b3b879c34..2e70bd77205 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -64,7 +64,8 @@ struct GPU_ShaderCreateFromArray_Params { /** * Use via #GPU_shader_create_from_arrays macro (avoids passing in param). * - * Similar to #DRW_shader_create_with_lib with the ability to include libs for each type of shader. + * Similar to #DRW_shader_create_with_lib with the ability to include libraries for each type of + * shader. * * It has the advantage that each item can be conditionally included * without having to build the string inline, then free it. diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index d64b3d361cf..edd70e0f9d7 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -471,7 +471,7 @@ typedef struct Library { */ char filepath_abs[1024]; - /** Set for indirectly linked libs, used in the outliner and while reading. */ + /** Set for indirectly linked libraries, used in the outliner and while reading. */ struct Library *parent; struct PackedFile *packedfile; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 23b76e855b2..c8ff0083b5e 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -12,8 +12,10 @@ /* XXX(@campbellbarton): temp feature. */ #define DURIAN_CAMERA_SWITCH -/* check for cyclic set-scene, - * libs can cause this case which is normally prevented, see (T#####) */ +/** + * Check for cyclic set-scene. + * Libraries can cause this case which is normally prevented, see (T42009). + */ #define USE_SETSCENE_CHECK #include "DNA_ID.h" diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index c0f92010c22..d8005b83383 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -184,7 +184,7 @@ typedef struct Sequence { /** Old animation system, deprecated for 2.5. */ struct Ipo *ipo DNA_DEPRECATED; - /** these ID vars should never be NULL but can be when linked libs fail to load, + /** these ID vars should never be NULL but can be when linked libraries fail to load, * so check on access */ struct Scene *scene; /** Override scene camera. */ -- cgit v1.2.3