Cleanup: spelling & punctuation in comments

This commit is contained in:
Campbell Barton
2024-09-03 12:59:37 +10:00
parent 7bb8ab8194
commit d19c13eb82
19 changed files with 73 additions and 73 deletions

View File

@@ -45,28 +45,28 @@ class GHOST_ISystemPaths {
public:
/**
* Determine the base dir in which shared resources are located. It will first try to use
* Determine the base directory in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg /usr/share/blender/).
* \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`).
*/
virtual const char *getSystemDir(int version, const char *versionstr) const = 0;
/**
* Determine the base dir in which user configuration is stored, including versioning.
* Determine the base directory in which user configuration is stored, including versioning.
* If needed, it will create the base directory.
* \return Unsigned char string pointing to user dir (eg ~/.blender/).
* \return Unsigned char string pointing to user directory (eg `~/.blender/`).
*/
virtual const char *getUserDir(int version, const char *versionstr) const = 0;
/**
* Determine a special ("well known") and easy to reach user directory.
* \return Unsigned char string pointing to user dir (eg `~/Documents/`).
* \return Unsigned char string pointing to user directory (eg `~/Documents/`).
*/
virtual const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const = 0;
/**
* Determine the directory of the current binary
* \return Unsigned char string pointing to the binary dir
* \return Unsigned char string pointing to the binary directory.
*/
virtual const char *getBinaryDir() const = 0;

View File

@@ -26,22 +26,22 @@ class GHOST_SystemPaths : public GHOST_ISystemPaths {
public:
/**
* Determine the base dir in which shared resources are located. It will first try to use
* Determine the base directory in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg /usr/share/blender/).
* \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`).
*/
virtual const char *getSystemDir(int version, const char *versionstr) const = 0;
/**
* Determine the base dir in which user configuration is stored, including versioning.
* Determine the base directory in which user configuration is stored, including versioning.
* If needed, it will create the base directory.
* \return Unsigned char string pointing to user dir (eg ~/.blender/).
* \return Unsigned char string pointing to user directory (eg `~/.blender/`).
*/
virtual const char *getUserDir(int version, const char *versionstr) const = 0;
/**
* Determine the directory of the current binary
* \return Unsigned char string pointing to the binary dir
* Determine the directory of the current binary.
* \return Unsigned char string pointing to the binary directory.
*/
virtual const char *getBinaryDir() const = 0;

View File

@@ -27,28 +27,28 @@ class GHOST_SystemPathsCocoa : public GHOST_SystemPaths {
~GHOST_SystemPathsCocoa();
/**
* Determine the base dir in which shared resources are located. It will first try to use
* Determine the base directory in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg /usr/share/blender/).
* \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`).
*/
const char *getSystemDir(int version, const char *versionstr) const;
/**
* Determine the base dir in which user configuration is stored, including versioning.
* Determine the base directory in which user configuration is stored, including versioning.
* If needed, it will create the base directory.
* \return Unsigned char string pointing to user dir (eg ~/.blender/).
* \return Unsigned char string pointing to user directory (eg `~/.blender/`).
*/
const char *getUserDir(int version, const char *versionstr) const;
/**
* Determine a special ("well known") and easy to reach user directory.
* \return Unsigned char string pointing to user dir (eg `~/Documents/`).
* \return Unsigned char string pointing to user directory (eg `~/Documents/`).
*/
const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const;
/**
* Determine the directory of the current binary
* \return Unsigned char string pointing to the binary dir
* Determine the directory of the current binary.
* \return Unsigned char string pointing to the binary directory.
*/
const char *getBinaryDir() const;

View File

@@ -25,28 +25,28 @@ class GHOST_SystemPathsUnix : public GHOST_SystemPaths {
~GHOST_SystemPathsUnix();
/**
* Determine the base dir in which shared resources are located. It will first try to use
* Determine the base directory in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg `/usr/share/blender/`).
* \return Unsigned char string pointing to system directory (eg `/usr/share/blender/`).
*/
const char *getSystemDir(int version, const char *versionstr) const;
/**
* Determine the base dir in which user configuration is stored, including versioning.
* Determine the base directory in which user configuration is stored, including versioning.
* If needed, it will create the base directory.
* \return Unsigned char string pointing to user dir (eg `~/.config/.blender/`).
* \return Unsigned char string pointing to user directory (eg `~/.config/.blender/`).
*/
const char *getUserDir(int version, const char *versionstr) const;
/**
* Determine a special ("well known") and easy to reach user directory.
* \return Unsigned char string pointing to user dir (eg `~/Documents/`).
* \return Unsigned char string pointing to user directory (eg `~/Documents/`).
*/
const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const;
/**
* Determine the directory of the current binary
* \return Unsigned char string pointing to the binary dir
* Determine the directory of the current binary.
* \return Unsigned char string pointing to the binary directory.
*/
const char *getBinaryDir() const;

View File

@@ -34,28 +34,28 @@ class GHOST_SystemPathsWin32 : public GHOST_SystemPaths {
~GHOST_SystemPathsWin32();
/**
* Determine the base dir in which shared resources are located. It will first try to use
* Determine the base directory in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, including versioning.
* \return Unsigned char string pointing to system dir (eg /usr/share/).
* \return Unsigned char string pointing to system directory (eg `/usr/share/`).
*/
const char *getSystemDir(int version, const char *versionstr) const;
/**
* Determine the base dir in which user configuration is stored, including versioning.
* Determine the base directory in which user configuration is stored, including versioning.
* If needed, it will create the base directory.
* \return Unsigned char string pointing to user dir (eg ~/).
* \return Unsigned char string pointing to user directory (eg `~/`).
*/
const char *getUserDir(int version, const char *versionstr) const;
/**
* Determine a special ("well known") and easy to reach user directory.
* \return Unsigned char string pointing to user dir (eg `~/Documents/`).
* \return Unsigned char string pointing to user directory (eg `~/Documents/`).
*/
const char *getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const;
/**
* Determine the directory of the current binary
* \return Unsigned char string pointing to the binary dir
* Determine the directory of the current binary.
* \return Unsigned char string pointing to the binary directory.
*/
const char *getBinaryDir() const;

View File

@@ -294,7 +294,7 @@ class BONE_PT_collections(BoneButtonsPanel, Panel):
row.prop(bcoll, "is_solo", text="", icon='SOLO_ON' if bcoll.is_solo else 'SOLO_OFF')
# Unassignment operator, less safe so with a bit of spacing.
# Unassign operator, less safe so with a bit of spacing.
props = bcoll_row.operator("armature.collection_unassign_named", text="", icon='X')
props.name = bcoll.name
props.bone_name = bone.name

View File

@@ -1516,7 +1516,7 @@ void ccgFaceIterator_next(CCGFaceIterator *fi)
ccg_ehashIterator_next((EHashIterator *)fi);
}
/*** Extern API final vert/edge/face interface ***/
/*** External API final vert/edge/face interface. ***/
int ccgSubSurf_getNumFinalVerts(const CCGSubSurf *ss)
{

View File

@@ -675,7 +675,7 @@ static void splineik_evaluate_bone(
}
}
/* Compute scale factor for xz axes from this value. */
/* Compute scale factor for XZ axes from this value. */
final_scale = sqrtf(bulge);
}
else {

View File

@@ -62,7 +62,7 @@ static float ocean_spectrum_wind_and_damp(const Ocean *oc,
const float k_mag_inv = 1.0f / k2;
const float k_dot_w = (kx * k_mag_inv * oc->_wx) + (kz * k_mag_inv * oc->_wz);
/* Bias towards wind dir. */
/* Bias towards wind direction. */
float newval = val * pow(fabs(k_dot_w), oc->_wind_alignment);
/* Eliminate wavelengths smaller than cutoff. */

View File

@@ -1493,7 +1493,7 @@ template<typename T> static void re_delaunay_triangulate(CDTArrangement<T> *cdt,
if (se->face == cdt->outer_face || sym(se)->face == cdt->outer_face) {
return;
}
/* 'se' is a diagonal just added, and it is base of area to retriangulate (face on its left) */
/* `se` is a diagonal just added, and it is base of area to re-triangulate (face on its left). */
int count = 1;
for (SymEdge<T> *ss = se->next; ss != se; ss = ss->next) {
count++;
@@ -2072,7 +2072,7 @@ void add_edge_constraint(
if (r_edges != nullptr) {
BLI_linklist_append(&edge_list, edge);
}
/* Now retriangulate upper and lower gaps. */
/* Now re-triangulate upper and lower gaps. */
re_delaunay_triangulate(&cdt_state->cdt, &edge->symedges[0]);
re_delaunay_triangulate(&cdt_state->cdt, &edge->symedges[1]);
}

View File

@@ -26,9 +26,9 @@ class BlendfileLoadingBaseTest : public testing::Test {
virtual void TearDown();
/* Loads a blend file from the tests/data directory from SVN.
* Returns 'ok' flag (true=good, false=bad) and sets this->bfile.
* Returns 'ok' flag (true=good, false=bad) and sets `this->bfile`.
* Fails the test if the file cannot be loaded (still returns though).
* Requires the CLI argument --test-asset-dir to point to ../tests/data.
* Requires the CLI argument `--test-asset-dir` to point to `../tests/data`.
*
* WARNING: only files saved with Blender 2.80+ can be loaded. Since Blender
* is only partially initialized (most importantly, without window manager),

View File

@@ -9,7 +9,7 @@
namespace blender::compositor {
/* TODO(manzanilla): After removing tiled implementation, implement a default #determine_resolution
* for all constant operations and make all initialization and deinitilization methods final. */
* for all constant operations and make all initialization and de-initialization methods final. */
/**
* Base class for operations that are always constant. Operations that can be constant only when
* all their inputs are so, are evaluated into primitive constants (Color/Vector/Value) during

View File

@@ -133,7 +133,7 @@ struct VolumeProbe : public LightProbe, VolumeProbeData {
const LightProbeObjectCache *cache = nullptr;
/** List of associated atlas bricks that are used by this grid. */
Vector<IrradianceBrickPacked> bricks;
/** True if the grid needs to be reuploaded & re-composited with other light-grids. */
/** True if the grid needs to be re-uploaded & re-composited with other light-grids. */
bool do_update;
/** Index of the grid inside the grid UBO. */
int grid_index;

View File

@@ -910,7 +910,7 @@ bool ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, bool replace, FCurve *c
* (check anim_channels_defines.cc for details).
*
* \return the icon of whatever struct the F-Curve's RNA path resolves to.
* Returns std::nullopt if the path could not be resolved.
* Returns #std::nullopt if the path could not be resolved.
*/
std::optional<int> getname_anim_fcurve(char *name, ID *id, FCurve *fcu);

View File

@@ -165,7 +165,7 @@ void imapaint_image_update(
/* When buffer is partial updated the planes should be set to a larger value than 8. This will
* make sure that partial updating is working but uses more GPU memory as the gpu texture will
* have 4 channels. When so the whole texture needs to be reuploaded to the GPU using the new
* have 4 channels. When so the whole texture needs to be re-uploaded to the GPU using the new
* texture format. */
if (ibuf != nullptr && ibuf->planes == 8) {
ibuf->planes = 32;

View File

@@ -982,52 +982,52 @@ typedef enum eKinematic_Flags {
CONSTRAINT_IK_TARGETAXIS = (1 << 14),
} eKinematic_Flags;
/* bSplineIKConstraint->flag */
/** #bSplineIKConstraint::flag */
typedef enum eSplineIK_Flags {
/* chain has been attached to spline */
/** Chain has been attached to spline. */
CONSTRAINT_SPLINEIK_BOUND = (1 << 0),
/* root of chain is not influenced by the constraint */
/** Root of chain is not influenced by the constraint. */
CONSTRAINT_SPLINEIK_NO_ROOT = (1 << 1),
#ifdef DNA_DEPRECATED_ALLOW
/* bones in the chain should not scale to fit the curve */
/** Bones in the chain should not scale to fit the curve. */
CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1 << 2),
#endif
/* evenly distribute the bones along the path regardless of length */
/** Evenly distribute the bones along the path regardless of length. */
CONSTRAINT_SPLINEIK_EVENSPLITS = (1 << 3),
/* don't adjust the x and z scaling of the bones by the curve radius */
/** Don't adjust the X and Z scaling of the bones by the curve radius. */
CONSTRAINT_SPLINEIK_NO_CURVERAD = (1 << 4),
/* for "volumetric" xz scale mode, limit the minimum or maximum scale values */
/** For "volumetric" XZ scale mode, limit the minimum or maximum scale values. */
CONSTRAINT_SPLINEIK_USE_BULGE_MIN = (1 << 5),
CONSTRAINT_SPLINEIK_USE_BULGE_MAX = (1 << 6),
/* apply volume preservation over original scaling of the bone */
/** Apply volume preservation over original scaling of the bone. */
CONSTRAINT_SPLINEIK_USE_ORIGINAL_SCALE = (1 << 7),
} eSplineIK_Flags;
/* bSplineIKConstraint->xzScaleMode */
/** #bSplineIKConstraint::xzScaleMode */
typedef enum eSplineIK_XZScaleModes {
/* no x/z scaling */
/** No X/Z scaling. */
CONSTRAINT_SPLINEIK_XZS_NONE = 0,
/* bones in the chain should take their x/z scales from the original scaling */
/** Bones in the chain should take their X/Z scales from the original scaling. */
CONSTRAINT_SPLINEIK_XZS_ORIGINAL = 1,
/* x/z scales are the inverse of the y-scale */
/** X/Z scales are the inverse of the Y-scale. */
CONSTRAINT_SPLINEIK_XZS_INVERSE = 2,
/* x/z scales are computed using a volume preserving technique (from Stretch To constraint) */
/** X/Z scales are computed using a volume preserving technique (from Stretch To constraint). */
CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC = 3,
} eSplineIK_XZScaleModes;
/* bSplineIKConstraint->yScaleMode */
/** #bSplineIKConstraint::yScaleMode */
typedef enum eSplineIK_YScaleModes {
/* no y scaling */
/** No Y scaling. */
CONSTRAINT_SPLINEIK_YS_NONE = 0,
/* bones in the chain should be scaled to fit the length of the curve */
/** Bones in the chain should be scaled to fit the length of the curve. */
CONSTRAINT_SPLINEIK_YS_FIT_CURVE = 1,
/* bones in the chain should take their y scales from the original scaling */
/** Bones in the chain should take their y scales from the original scaling. */
CONSTRAINT_SPLINEIK_YS_ORIGINAL = 2,
} eSplineIK_YScaleModes;
/* bArmatureConstraint -> flag */
/** #bArmatureConstraint::flag */
typedef enum eArmature_Flags {
/** use dual quaternion blending */
CONSTRAINT_ARMATURE_QUATERNION = (1 << 0),

View File

@@ -1,4 +1,4 @@
/* SPDX-FileCopyrightText: 2005 Gradienter Foundation. All rights reserved.
/* SPDX-FileCopyrightText: 2005 Blender Foundation. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0-or-later */

View File

@@ -16,7 +16,7 @@
#ifdef WITH_SDL
/* SDL force defines __SSE__ and __SSE2__ flags, which generates warnings
* because we pass those defines via command line as well. For until there's
* proper ifndef added to SDL headers we ignore the redefinition warning.
* proper `ifndef` added to SDL headers we ignore the redefinition warning.
*/
# ifdef _MSC_VER
# pragma warning(push)

View File

@@ -73,29 +73,29 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat,
VectorType z(n), tmp(n);
RealScalar absNew = numext::real(
residual.dot(p)); /* the square of the absolute value of r scaled by invM */
residual.dot(p)); /* The square of the absolute value of `r` scaled by `invM`. */
int i = 0;
while (i < maxIters) {
tmp.noalias() = filter * (mat * p); /* the bottleneck of the algorithm */
tmp.noalias() = filter * (mat * p); /* The bottleneck of the algorithm. */
Scalar alpha = absNew / p.dot(tmp); /* the amount we travel on dir */
x += alpha * p; /* update solution */
residual -= alpha * tmp; /* update residue */
Scalar alpha = absNew / p.dot(tmp); /* The amount we travel on direction. */
x += alpha * p; /* Update solution. */
residual -= alpha * tmp; /* Update residue. */
residualNorm2 = residual.squaredNorm();
if (residualNorm2 < threshold) {
break;
}
z = precond.solve(residual); /* approximately solve for "A z = residual" */
z = precond.solve(residual); /* Approximately solve for `A z = residual`. */
RealScalar absOld = absNew;
absNew = numext::real(residual.dot(z)); /* update the absolute value of r */
absNew = numext::real(residual.dot(z)); /* Update the absolute value of `r`. */
/* Calculate the Gram-Schmidt value used to create the new search direction. */
RealScalar beta = absNew / absOld;
p = filter * (z + beta * p); /* update search direction */
p = filter * (z + beta * p); /* Update search direction. */
i++;
}
tol_error = sqrt(residualNorm2 / rhsNorm2);