Cleanup: spelling in comments & strings

This commit is contained in:
Campbell Barton 2021-11-30 09:04:50 +11:00
parent 262ef26ea3
commit 4e45265dc6
36 changed files with 64 additions and 65 deletions

View File

@ -629,7 +629,7 @@ void BlenderSession::bake(BL::Depsgraph &b_depsgraph_,
integrator->set_use_emission((bake_filter & BL::BakeSettings::pass_filter_EMIT) != 0);
}
/* Always use transpanent background for baking. */
/* Always use transparent background for baking. */
scene->background->set_transparent(true);
/* Load built-in images from Blender. */

View File

@ -335,7 +335,7 @@ bool OptiXDevice::load_kernels(const uint kernel_features)
# if OPTIX_ABI_VERSION >= 55
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_CATMULLROM;
builtin_options.buildFlags = OPTIX_BUILD_FLAG_PREFER_FAST_TRACE;
builtin_options.curveEndcapFlags = OPTIX_CURVE_ENDCAP_DEFAULT; /* Disable endcaps. */
builtin_options.curveEndcapFlags = OPTIX_CURVE_ENDCAP_DEFAULT; /* Disable end-caps. */
# else
builtin_options.builtinISModuleType = OPTIX_PRIMITIVE_TYPE_ROUND_CUBIC_BSPLINE;
# endif
@ -1281,7 +1281,7 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit)
}
else {
/* Disable visibility test any-hit program, since it is already checked during
* intersection. Those trace calls that require anyhit can force it with a ray flag. */
* intersection. Those trace calls that require any-hit can force it with a ray flag. */
build_flags |= OPTIX_GEOMETRY_FLAG_DISABLE_ANYHIT;
build_input.type = OPTIX_BUILD_INPUT_TYPE_CUSTOM_PRIMITIVES;
@ -1449,7 +1449,7 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit)
}
}
# if OPTIX_ABI_VERSION < 55
/* Cannot disable any-hit program for thick curves, since it needs to filter out endcaps. */
/* Cannot disable any-hit program for thick curves, since it needs to filter out end-caps. */
else
# endif
{

View File

@ -250,7 +250,7 @@ ccl_device_intersect bool scene_intersect(KernelGlobals kg,
uint ray_mask = visibility & 0xFF;
if (0 == ray_mask && (visibility & ~0xFF) != 0) {
ray_mask = 0xFF;
/* No further intersector setup required: Default MetalRT behaviour is anyhit */
/* No further intersector setup required: Default MetalRT behavior is any-hit. */
}
else if (visibility & PATH_RAY_SHADOW_OPAQUE) {
/* No further intersector setup required: Shadow ray early termination is controlled by the

View File

@ -1204,7 +1204,7 @@ typedef struct KernelIntegrator {
/* Closure filter. */
int filter_closures;
/* MIS debuging */
/* MIS debugging. */
int direct_light_sampling_type;
/* padding */

View File

@ -72,13 +72,13 @@ short BKE_blendfile_link_append_context_item_idcode_get(
struct BlendfileLinkAppendContext *lapp_context, struct BlendfileLinkAppendContextItem *item);
typedef enum eBlendfileLinkAppendForeachItemFlag {
/** Loop over directly linked items (i.e. those explicitely defined by user code). */
/** Loop over directly linked items (i.e. those explicitly defined by user code). */
BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_DIRECT = 1 << 0,
/** Loop over indirectly linked items (i.e. those defined by internal code, as dependencies of
* direct ones).
*
* IMPORTANT: Those 'indirect' items currently may not cover **all** indrectly linked data. See
* comments in #foreach_libblock_link_append_callback. */
* IMPORTANT: Those 'indirect' items currently may not cover **all** indirectly linked data.
* See comments in #foreach_libblock_link_append_callback. */
BKE_BLENDFILE_LINK_APPEND_FOREACH_ITEM_FLAG_DO_INDIRECT = 1 << 0,
} eBlendfileLinkAppendForeachItemFlag;
/** Callback called by #BKE_blendfile_link_append_context_item_foreach over each (or a subset of

View File

@ -22,7 +22,7 @@
*/
/* TODO: Make this module handle a bit more safely string length, instead of assuming buffers are
* FILE_MAX len etc. */
* FILE_MAX length etc. */
#pragma once
@ -54,13 +54,13 @@ typedef enum eBPathForeachFlag {
* `foreach_path` implementations and/or callbacks to implement specific behaviors. */
/** Skip paths where a single dir is used with an array of files, eg. sequence strip images or
* pointcaches. In this case only use the first file path is processed.
* point-caches. In this case only use the first file path is processed.
*
* This is needed for directory manipulation callbacks which might otherwise modify the same
* directory multiple times. */
BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE = (1 << 8),
/** Reload data (when the path is edited).
* \note Ony used by Image IDType currently. */
* \note Only used by Image IDType currently. */
BKE_BPATH_FOREACH_PATH_RELOAD_EDITED = (1 << 9),
} eBPathForeachFlag;
@ -76,7 +76,7 @@ typedef bool (*BPathForeachPathFunctionCallback)(struct BPathForeachPathData *bp
char *r_path_dst,
const char *path_src);
/** Storage for common data needed accross the BPath 'foreach_path' code. */
/** Storage for common data needed across the BPath 'foreach_path' code. */
typedef struct BPathForeachPathData {
struct Main *bmain;

View File

@ -98,7 +98,7 @@ typedef enum {
eModifierTypeFlag_RequiresOriginalData = (1 << 5),
/**
* For modifiers that support pointcache,
* For modifiers that support point-cache,
* so we can check to see if it has files we need to deal with.
*/
eModifierTypeFlag_UsesPointCache = (1 << 6),

View File

@ -18,8 +18,8 @@
* \ingroup bke
*
* High level `.blend` file link/append code,
* including linking/appending several IDs from different libraries, handling instanciations of
* collections/objects/obdata in current scene.
* including linking/appending several IDs from different libraries, handling instantiations of
* collections/objects/object-data in current scene.
*/
#include <stdlib.h>
@ -110,7 +110,7 @@ typedef struct BlendfileLinkAppendContext {
LinkNodePair items;
int num_libraries;
int num_items;
/** Linking/appending parameters. Including bmain, scene, viewlayer and view3d. */
/** Linking/appending parameters. Including `bmain`, `scene`, `viewlayer` and `view3d`. */
LibraryLink_Params *params;
/** Allows to easily find an existing items from an ID pointer. */
@ -245,7 +245,7 @@ void BKE_blendfile_link_append_context_embedded_blendfile_set(
BlendfileLinkAppendContext *lapp_context, const void *blendfile_mem, int blendfile_memsize)
{
BLI_assert_msg(lapp_context->blendfile_mem == NULL,
"Please explicitely clear reference to an embedded blender memfile before "
"Please explicitly clear reference to an embedded blender memfile before "
"setting a new one");
lapp_context->blendfile_mem = blendfile_mem;
lapp_context->blendfile_memsize = (size_t)blendfile_memsize;
@ -530,7 +530,7 @@ static void loose_data_instantiate_object_base_instance_init(Main *bmain,
}
/* Tag obdata that actually need to be instantiated (those referenced by an object do not, since
* the object will be instantiated instaed if needed. */
* the object will be instantiated instead if needed. */
static void loose_data_instantiate_obdata_preprocess(
LooseDataInstantiateContext *instantiate_context)
{
@ -854,7 +854,7 @@ static int foreach_libblock_link_append_callback(LibraryIDLinkCallbackData *cb_d
* processed, so we need to recursively deal with them here. */
/* NOTE: Since we are by-passing checks in `BKE_library_foreach_ID_link` by manually calling it
* recursively, we need to take care of potential recursion cases ourselves (e.g.animdata of
* shapekey referencing the shapekey itself). */
* shape-key referencing the shape-key itself). */
if (id != cb_data->id_self) {
BKE_library_foreach_ID_link(
cb_data->bmain, id, foreach_libblock_link_append_callback, data, IDWALK_NOP);
@ -946,8 +946,8 @@ void BKE_blendfile_append(BlendfileLinkAppendContext *lapp_context, ReportList *
/* Linked IDs should never be marked as needing post-processing (instantiation of loose
* objects etc.).
* NOTE: This is dev test check, can be removed once we get rid of instantiation code in BLO
* completely.*/
* NOTE: This is a developer test check, can be removed once we get rid of instantiation code
* in BLO completely.*/
BLI_assert((id->tag & LIB_TAG_DOIT) == 0);
ID *existing_local_id = BKE_idtype_idcode_append_is_reusable(GS(id->name)) ?
@ -1206,8 +1206,8 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
/* here appending/linking starts */
/* NOTE: This is temporary hotfix until whole code using link/append features has been moved to
* use new BKE code. */
/* NOTE: This is temporary hot-fix until whole code using link/append features has been moved
* to use new BKE code. */
/* Do not handle instantiation in linking process anymore, we do it here in
* #loose_data_instantiate instead. */
lapp_context->params->flag &= ~BLO_LIBLINK_NEEDS_ID_TAG_DOIT;
@ -1271,8 +1271,8 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
/* Linked IDs should never be marked as needing post-processing (instantiation of loose
* objects etc.).
* NOTE: This is dev test check, can be removed once we get rid of instantiation code in BLO
* completely.*/
* NOTE: This is developer test check, can be removed once we get rid of instantiation code
* in BLO completely.*/
BLI_assert((id->tag & LIB_TAG_DOIT) == 0);
BlendfileLinkAppendContextCallBack cb_data = {

View File

@ -264,7 +264,7 @@ static void image_foreach_path(ID *id, BPathForeachPathData *bpath_data)
/* Skip empty file paths, these are typically from generated images and
* don't make sense to add directories to until the image has been saved
* once to give it a meaningful value. */
/* TODO re-assess whether this behavior is disired in the new generic code context. */
/* TODO re-assess whether this behavior is desired in the new generic code context. */
if (!ELEM(ima->source, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED) ||
ima->filepath[0] == '\0') {
return;

View File

@ -1854,7 +1854,7 @@ bool BKE_id_new_name_validate(ListBase *lb, ID *id, const char *tname, const boo
return result;
}
/* next to indirect usage in read/writefile also in editobject.c scene.c */
/* Next to indirect usage in `readfile.c/writefile.c` also in `editobject.c`, `scene.c`. */
void BKE_main_id_newptr_and_tag_clear(Main *bmain)
{
ID *id;

View File

@ -902,7 +902,7 @@ static bool seq_foreach_path_callback(Sequence *seq, void *user_data)
BKE_bpath_foreach_path_dirfile_fixed_process(bpath_data, seq->strip->dir, se->name);
}
else if ((seq->type == SEQ_TYPE_IMAGE) && se) {
/* NOTE: An option not to loop over all strips could be usefull? */
/* NOTE: An option not to loop over all strips could be useful? */
unsigned int len = (unsigned int)MEM_allocN_len(se) / (unsigned int)sizeof(*se);
unsigned int i;

View File

@ -578,7 +578,7 @@ template<typename T> class VArrayCommon {
/* Make sure we are actually constructing a #VArrayImpl. */
static_assert(std::is_base_of_v<VArrayImpl<T>, ImplT>);
if constexpr (std::is_copy_constructible_v<ImplT> && Storage::template is_inline_v<ImplT>) {
/* Only inline the implementatiton when it is copyable and when it fits into the inline
/* Only inline the implementation when it is copyable and when it fits into the inline
* buffer of the storage. */
impl_ = &storage_.template emplace<ImplT>(std::forward<Args>(args)...);
}

View File

@ -77,7 +77,7 @@ typedef struct {
bool memchunk_identical;
} UndoReader;
/* actually only used writefile.c */
/* Actually only used `writefile.c`. */
void BLO_memfile_write_init(MemFileWriteData *mem_data,
MemFile *written_memfile,

View File

@ -21,7 +21,7 @@
/** \file
* \ingroup blenloader
* \brief external writefile function prototypes.
* \brief external `writefile.c` function prototypes.
*/
#ifdef __cplusplus

View File

@ -2376,8 +2376,8 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
/* Special case to handle older in-dev 3.1 files, before change from 3.0 branch gets merged in
* master. */
/* Special case to handle older in-development 3.1 files, before change from 3.0 branch gets
* merged in master. */
if (!MAIN_VERSION_ATLEAST(bmain, 300, 42) ||
(bmain->versionfile == 301 && !MAIN_VERSION_ATLEAST(bmain, 301, 3))) {
/* Update LibOverride operations regarding insertions in RNA collections (i.e. modifiers,

View File

@ -106,7 +106,7 @@ enum class NodeType {
/* Component which is used to define visibility relation between IDs, on the ID level.
*
* Consider two ID nodes NodeA and NodeB, with the relation between visibility components going
* as NodeA -> NodeB. If NodeB is considreed visible on screen, then the relation will ensure
* as NodeA -> NodeB. If NodeB is considered visible on screen, then the relation will ensure
* that NodeA is also visible. The way how relation is oriented could be seen as a inverted from
* visibility dependency point of view, but it follows the same direction as data dependency
* which simplifies common algorithms which are dealing with relations and visibility.

View File

@ -532,11 +532,11 @@ struct AssetIndex {
const int UNKNOWN_VERSION = -1;
/**
* `blender::io::serialize::Value` represeting the contents of an index file.
* `blender::io::serialize::Value` representing the contents of an index file.
*
* Value is used over ObjectValue as the contents of the index could be corrupted and doesn't
* Value is used over #ObjectValue as the contents of the index could be corrupted and doesn't
* represent an object. In case corrupted files are detected the `get_version` would return
* UNKNOWN_VERSION.`
* `UNKNOWN_VERSION`.
*/
std::unique_ptr<Value> contents;

View File

@ -907,7 +907,7 @@ static bool has_external_files(Main *bmain, struct ReportList *reports)
eBPathForeachFlag flag = static_cast<eBPathForeachFlag>(
BKE_BPATH_FOREACH_PATH_SKIP_PACKED /* Packed files are fine. */
| BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE); /* Only report multifiles once, it's enough. */
| BKE_BPATH_FOREACH_PATH_SKIP_MULTIFILE); /* Only report multi-files once, it's enough. */
BPathForeachPathData bpath_data = {
/* bmain */ bmain,

View File

@ -50,7 +50,7 @@ typedef enum eFileIndexerResult {
FILE_INDEXER_ENTRIES_LOADED,
/**
* Index isn't available or not upto date. Entries should be read from te blend file and
* Index isn't available or not up to date. Entries should be read from the blend file and
* `update_index` must be called to update the index.
*/
FILE_INDEXER_NEEDS_UPDATE,
@ -103,7 +103,7 @@ typedef struct FileIndexerType {
* Is called at the end of the file listing process (before the `free_user_data`) where indexes
* can perform clean-ups.
*
* This is an optinal callback. Called when listing files completed.
* This is an optional callback. Called when listing files completed.
*/
FileIndexerFinishedFunc filelist_finished;

View File

@ -25,7 +25,7 @@
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stddef.h> /* offsetof() */
#include <stddef.h> /* `offsetof()` */
#include <string.h>
#include "MEM_guardedalloc.h"

View File

@ -46,7 +46,7 @@ struct ViewLink : public Link {
using TreeViewPtr = std::unique_ptr<AbstractTreeView>;
std::string idname;
/* Note: Can't use std::get() on this until minimum macOS deployment target is 10.14. */
/* NOTE: Can't use std::get() on this until minimum macOS deployment target is 10.14. */
std::variant<TreeViewPtr> view;
};

View File

@ -265,7 +265,7 @@ typedef struct CurveMaskCache {
int last_curve_timestamp;
/**
* \brief sampled version of the brush curvemapping.
* \brief sampled version of the brush curve-mapping.
*/
float *sampled_curve;
@ -414,4 +414,3 @@ void paint_delete_blur_kernel(BlurKernel *);
#ifdef __cplusplus
}
#endif

View File

@ -376,7 +376,7 @@ bool AssetCatalogDropController::can_drop(const wmDrag &drag, const char **r_dis
{
if (drag.type == WM_DRAG_ASSET_CATALOG) {
const AssetCatalog *drag_catalog = get_drag_catalog(drag, get_asset_library());
/* Note: Technically it's not an issue to allow this (the catalog will just receive a new
/* NOTE: Technically it's not an issue to allow this (the catalog will just receive a new
* path and the catalog system will generate missing parents from the path). But it does
* appear broken to users, so disabling entirely. */
if (catalog_item_.catalog_path().is_contained_in(drag_catalog->path)) {

View File

@ -3255,7 +3255,7 @@ static int filelist_readjob_list_lib(const char *root,
/* Try read from indexer_runtime. */
/* Indexing returns all entries in a blend file. We should ignore the index when listing a group
* inside a blend file, so the `entries` isn't filled with undesired entries.
* This happens when linking or appending data-blocks, where you can navigate into a group (fe
* This happens when linking or appending data-blocks, where you can navigate into a group (ie
* Materials/Objects) where you only want to work with partial indexes.
*
* Adding support for partial reading/updating indexes would increase the complexity.

View File

@ -1385,8 +1385,8 @@ void file_params_renamefile_activate(SpaceFile *sfile, FileSelectParams *params)
params->rename_flag = FILE_PARAMS_RENAME_ACTIVE;
}
else if ((params->rename_flag & FILE_PARAMS_RENAME_POSTSCROLL_PENDING) != 0) {
/* file_select_deselect_all() will resort and refilter, so idx will probably have changed.
* Need to get the correct FileDirEntry again. */
/* file_select_deselect_all() will resort and re-filter, so `idx` will probably have changed.
* Need to get the correct #FileDirEntry again. */
file_select_deselect_all(sfile, FILE_SEL_SELECTED);
idx = file_params_find_renamed(params, sfile->files);
file = filelist_file(sfile->files, idx);

View File

@ -147,7 +147,7 @@ static int memfile_undosys_step_id_reused_cb(LibraryIDLinkCallbackData *cb_data)
/**
* ID previews may be generated in a parallel job. So whatever operation generates the preview
* likely does the undo push before the preview is actually done and stored in the ID. Hence they
* get some extra treatement here:
* get some extra treatment here:
* When undoing back to the moment the preview generation was triggered, this function schedules
* the preview for regeneration.
*/

View File

@ -2332,9 +2332,9 @@ static bool lineart_edge_from_triangle(const LineartTriangle *tri,
* if returns true, then from/to will carry the occluded segments
* in ratio from `e->v1` to `e->v2`. The line is later cut with these two values.
*
* TODO: (Yiming) This function uses a convoluted method that needs to be redesigned.
* TODO(@Yiming): This function uses a convoluted method that needs to be redesigned.
*
* 1) The lineart_intersect_seg_seg() and lineart_point_triangle_relation() are separate calls,
* 1) The #lineart_intersect_seg_seg() and #lineart_point_triangle_relation() are separate calls,
* which would potentially return results that doesn't agree, especially when it's an edge
* extruding from one of the triangle's point. To get the information using one math process can
* solve this problem.
@ -2346,7 +2346,7 @@ static bool lineart_edge_from_triangle(const LineartTriangle *tri,
* I keep this function as-is because it's still fast, and more importantly the output value
* threshold is already in tune with the cutting function in the next stage.
* While current "edge aligned" fix isn't ideal, it does solve most of the precision issue
* especially in ortho camera mode.
* especially in orthographic camera mode.
*/
static bool lineart_triangle_edge_image_space_occlusion(SpinLock *UNUSED(spl),
const LineartTriangle *tri,

View File

@ -27,7 +27,7 @@
extern "C" {
#endif
/* Don't forget, new effects also in writefile.c for DNA! */
/* Don't forget, new effects also in `writefile.c` for DNA! */
#define PAF_MAXMULT 4

View File

@ -41,13 +41,13 @@ typedef struct TreeStoreElem {
/** Used only to store data in blend files. */
typedef struct TreeStore {
/** Was previously used for memory preallocation. */
/** Was previously used for memory pre-allocation. */
int totelem DNA_DEPRECATED;
/** Number of elements in data array. */
int usedelem;
/**
* Elements to be packed from mempool in writefile.c
* or extracted to mempool in readfile.c
* Elements to be packed from mempool in `writefile.c`
* or extracted to mempool in `readfile.c`.
*/
TreeStoreElem *data;
} TreeStore;

View File

@ -131,8 +131,8 @@ typedef struct PointCache {
void (*free_edit)(struct PTCacheEdit *edit);
} PointCache;
/** #PointCache.flag */
enum {
/* pointcache->flag */
PTCACHE_BAKED = 1 << 0,
PTCACHE_OUTDATED = 1 << 1,
PTCACHE_SIMULATION_VALID = 1 << 2,

View File

@ -281,7 +281,7 @@ typedef struct SpaceOutliner {
* Note that treestore may contain duplicate elements if element
* is used multiple times in outliner tree (e. g. linked objects)
* Also note that BLI_mempool can not be read/written in DNA directly,
* therefore readfile.c/writefile.c linearize treestore into TreeStore structure
* therefore `readfile.c/writefile.c` linearize treestore into TreeStore structure
*/
struct BLI_mempool *treestore;

View File

@ -186,7 +186,7 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
const float offset = fabsf(smd->offset) * smd->offset_clamp;
const bool do_angle_clamp = smd->flag & MOD_SOLIDIFY_OFFSET_ANGLE_CLAMP;
/* #do_flip, flips the normals of the result. This is inverted if negative thickness
* is used, since simple soldify with negative thickness keeps the faces facing outside. */
* is used, since simple solidify with negative thickness keeps the faces facing outside. */
const bool do_flip = ((smd->flag & MOD_SOLIDIFY_FLIP) != 0) == (smd->offset > 0);
const bool do_rim = smd->flag & MOD_SOLIDIFY_RIM;
const bool do_shell = ((smd->flag & MOD_SOLIDIFY_RIM) && (smd->flag & MOD_SOLIDIFY_NOSHELL)) ==

View File

@ -168,7 +168,7 @@ DInputSocket DOutputSocket::get_active_corresponding_group_output_socket() const
const DTreeContext *child_context = context_->child_context(socket_ref_->node());
if (child_context == nullptr) {
/* Can happen when the group node references a non-existant group (e.g. when the group is
/* Can happen when the group node references a non-existent group (e.g. when the group is
* linked but the original file is not found). */
return {};
}

View File

@ -3349,8 +3349,8 @@ static PyObject *bpy_bmiter_next(BPy_BMIter *self)
return (PyObject *)BPy_BMElem_CreatePyObject(self->bm, ele);
}
/* Dealloc Functions
* ================= */
/* Deallocate Functions
* ==================== */
static void bpy_bmesh_dealloc(BPy_BMesh *self)
{

View File

@ -356,7 +356,7 @@ static PyObject *pygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, PyObject *ar
GPU_offscreen_bind(self->ofs, true);
/* Cache the GPUViewport so the framebuffers and associated textures are
/* Cache the #GPUViewport so the frame-buffers and associated textures are
* not reallocated each time, see: T89204 */
if (!self->viewport) {
self->viewport = GPU_viewport_create();

View File

@ -79,7 +79,7 @@ typedef struct wmMsg {
} wmMsg;
typedef struct wmMsgSubscribeKey {
/** Linked list for predicable ordering, otherwise we would depend on ghash bucketing. */
/** Linked list for predicable ordering, otherwise we would depend on #GHash bucketing. */
struct wmMsgSubscribeKey *next, *prev;
ListBase values;
/* over-alloc, eg: wmMsgSubscribeKey_RNA */