Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2022-03-08 14:32:34 +11:00
parent c0c840cc31
commit 06d9c2c223
11 changed files with 25 additions and 24 deletions

View File

@ -6142,7 +6142,7 @@ static bool dynamicPaint_generateBakeData(DynamicPaintSurface *surface,
/* generate surface space partitioning grid */
surfaceGenerateGrid(surface);
/* calculate current frame adjacency point distances and global dirs */
/* Calculate current frame adjacency point distances and global directions. */
dynamicPaint_prepareAdjacencyData(surface, false);
/* Copy current frame vertices to check against in next frame */

View File

@ -149,10 +149,10 @@ eFileAttributes BLI_file_attributes(const char *path);
* \{ */
/**
* Scans the contents of the directory named *dirname, and allocates and fills in an
* array of entries describing them in *filelist.
* Scans the contents of the directory named `dir`, and allocates and fills in an
* array of entries describing them in `r_filelist`.
*
* \return The length of filelist array.
* \return The length of `r_filelist` array.
*/
unsigned int BLI_filelist_dir_contents(const char *dir, struct direntry **r_filelist);
/**

View File

@ -629,7 +629,7 @@ bool BLI_path_parent_dir(char *path)
BLI_path_normalize(NULL, tmp); /* does all the work of normalizing the path for us */
if (!BLI_path_extension_check(tmp, parent_dir)) {
strcpy(path, tmp); /* We assume pardir is always shorter... */
strcpy(path, tmp); /* We assume the parent directory is always shorter. */
return true;
}

View File

@ -161,14 +161,14 @@
* which keeps large arrays in memory from data-blocks we may not even use.
*
* \note This is disabled when using compression,
* while zlib supports seek it's unusable slow, see: T61880.
* while ZLIB supports seek it's unusably slow, see: T61880.
*/
#define USE_BHEAD_READ_ON_DEMAND
/* use GHash for BHead name-based lookups (speeds up linking) */
/** Use #GHash for #BHead name-based lookups (speeds up linking). */
#define USE_GHASH_BHEAD
/* Use GHash for restoring pointers by name */
/** Use #GHash for restoring pointers by name. */
#define USE_GHASH_RESTORE_POINTER
static CLG_LogRef LOG = {"blo.readfile"};
@ -194,8 +194,10 @@ typedef struct BHeadN {
#define BHEADN_FROM_BHEAD(bh) ((BHeadN *)POINTER_OFFSET(bh, -(int)offsetof(BHeadN, bhead)))
/* We could change this in the future, for now it's simplest if only data is delayed
* because ID names are used in lookup tables. */
/**
* We could change this in the future, for now it's simplest if only data is delayed
* because ID names are used in lookup tables.
*/
#define BHEAD_USE_READ_ON_DEMAND(bhead) ((bhead)->code == DATA)
void BLO_reportf_wrap(BlendFileReadReport *reports, eReportType type, const char *format, ...)

View File

@ -1859,7 +1859,7 @@ static void move_weld_profile_planes(BevVert *bv, BoundVert *bndv1, BoundVert *b
float l1 = normalize_v3(no);
/* "no" is new normal projection plane, but don't move if it is coplanar with both of the
* projection dirs. */
* projection directions. */
float no2[3], no3[3];
cross_v3_v3v3(no2, d1, bndv1->profile.proj_dir);
float l2 = normalize_v3(no2);

View File

@ -1125,8 +1125,8 @@ int file_select_match(struct SpaceFile *sfile, const char *pattern, char *matche
*/
for (int i = 0; i < n; i++) {
FileDirEntry *file = filelist_file(sfile->files, i);
/* Do not check whether file is a file or dir here! Causes T44243
* (we do accept dirs at this stage). */
/* Do not check whether file is a file or dir here! Causes: T44243
* (we do accept directories at this stage). */
if (fnmatch(pattern, file->relpath, 0) == 0) {
filelist_entry_select_set(sfile->files, file, FILE_SEL_ADD, FILE_SEL_SELECTED, CHECK_ALL);
if (!match) {

View File

@ -1358,7 +1358,7 @@ static TreeElement *outliner_item_drag_element_find(SpaceOutliner *space_outline
ARegion *region,
const wmEvent *event)
{
/* NOTE: using EVT_TWEAK_ events to trigger dragging is fine,
/* NOTE: using click-drag events to trigger dragging is fine,
* it sends coordinates from where dragging was started */
const float my = UI_view2d_region_to_view_y(&region->v2d, event->mval[1]);
return outliner_find_item_at_y(space_outliner, &space_outliner->tree, my);

View File

@ -71,7 +71,7 @@ void IMB_thumb_delete(const char *path, ThumbSize size);
struct ImBuf *IMB_thumb_manage(const char *path, ThumbSize size, ThumbSource source);
/**
* Create the necessary dirs to store the thumbnails.
* Create the necessary directories to store the thumbnails.
*/
void IMB_thumb_makedirs(void);

View File

@ -396,8 +396,7 @@ Object *DocumentImporter::create_instance_node(Object *source_ob,
anim_importer.read_node_transform(instance_node, obn);
/* if we also have a source_node (always ;), take its
* transformation matrix and apply it to the newly instantiated
* object to account for node hierarchy transforms in
* .dae */
* object to account for node hierarchy transforms in `.dae`. */
if (source_node) {
COLLADABU::Math::Matrix4 mat4 = source_node->getTransformationMatrix();
COLLADABU::Math::Matrix4 bmat4 =

View File

@ -189,7 +189,7 @@ void SceneExporter::writeNode(Object *ob)
"blender", con_tag, "lin_error", con->lin_error);
/* not ideal: add the target object name as another parameter.
* No real mapping in the .dae
* No real mapping in the `.dae`.
* Need support for multiple target objects also. */
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
ListBase targets = {nullptr, nullptr};

View File

@ -102,10 +102,10 @@ static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
y = texvec[1];
}
if (tex->stype == TEX_LIN) { /* lin */
if (tex->stype == TEX_LIN) { /* Linear. */
texres->tin = (1.0f + x) / 2.0f;
}
else if (tex->stype == TEX_QUAD) { /* quad */
else if (tex->stype == TEX_QUAD) { /* Quadratic. */
texres->tin = (1.0f + x) / 2.0f;
if (texres->tin < 0.0f) {
texres->tin = 0.0f;
@ -114,7 +114,7 @@ static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
texres->tin *= texres->tin;
}
}
else if (tex->stype == TEX_EASE) { /* ease */
else if (tex->stype == TEX_EASE) { /* Ease. */
texres->tin = (1.0f + x) / 2.0f;
if (texres->tin <= 0.0f) {
texres->tin = 0.0f;
@ -127,10 +127,10 @@ static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
texres->tin = (3.0f * t - 2.0f * t * texres->tin);
}
}
else if (tex->stype == TEX_DIAG) { /* diag */
else if (tex->stype == TEX_DIAG) { /* Diagonal. */
texres->tin = (2.0f + x + y) / 4.0f;
}
else if (tex->stype == TEX_RAD) { /* radial */
else if (tex->stype == TEX_RAD) { /* Radial. */
texres->tin = (atan2f(y, x) / (float)(2 * M_PI) + 0.5f);
}
else { /* sphere TEX_SPHERE */
@ -139,7 +139,7 @@ static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
texres->tin = 0.0f;
}
if (tex->stype == TEX_HALO) {
texres->tin *= texres->tin; /* halo */
texres->tin *= texres->tin; /* Halo. */
}
}