Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2023-08-18 08:51:29 +10:00
parent bf35eb9cbc
commit bc1ffdce5b
26 changed files with 47 additions and 45 deletions

View File

@ -18,7 +18,7 @@
#include "mallocn_intern.h"
#ifdef WITH_JEMALLOC_CONF
/* If jemalloc is used, it reads this global variable and enables background
/* If JEMALLOC is used, it reads this global variable and enables background
* threads to purge dirty pages. Otherwise we release memory too slowly or not
* at all if the thread that did the allocation stays inactive. */
const char *malloc_conf = "background_thread:true,dirty_decay_ms:4000";

View File

@ -249,7 +249,7 @@ typedef struct PTCacheEdit {
struct ParticleSystemModifierData *psmd;
struct ParticleSystemModifierData *psmd_eval;
struct KDTree_3d *emitter_field;
/* Localspace face centers and normals (average of its verts), from the derived mesh. */
/** Local-space face centers and normals (average of its verts), from the derived mesh. */
float *emitter_cosnos;
int *mirror_cache;

View File

@ -107,7 +107,7 @@ typedef struct SpaceType {
/**
* foreach_id callback to process all ID pointers of the editor. Used indirectly by lib_query's
* #BKE_library_foreach_ID_link when #IDWALK_INCLUDE_UI bitflag is set (through WM's foreach_id
* #BKE_library_foreach_ID_link when #IDWALK_INCLUDE_UI bit-flag is set (through WM's foreach_id
* usage of #BKE_screen_foreach_id_screen_area).
*/
void (*foreach_id)(struct SpaceLink *space_link, struct LibraryForeachIDData *data);

View File

@ -2200,7 +2200,7 @@ static void scene_objects_iterator_begin(BLI_Iterator *iter, Scene *scene, GSet
data->visited = BLI_gset_ptr_new(__func__);
}
/* We wrap the scenecollection iterator here to go over the scene collections. */
/* We wrap the scene-collection iterator here to go over the scene collections. */
BKE_scene_collections_iterator_begin(&data->scene_collection_iter, scene);
Collection *collection = static_cast<Collection *>(data->scene_collection_iter.current);

View File

@ -3359,7 +3359,7 @@ void nodeRemoveNode(Main *bmain, bNodeTree *ntree, bNode *node, const bool do_id
{
BLI_assert(ntree != nullptr);
/* This function is not for localized node trees, we do not want
* do to ID user reference-counting and removal of animdation data then. */
* do to ID user reference-counting and removal of animation data then. */
BLI_assert((ntree->id.tag & LIB_TAG_LOCALIZED) == 0);
bool node_has_id = false;

View File

@ -1493,7 +1493,7 @@ static void integrate_particle(
madd_v3_v3v3fl(states[1].co, states->co, states->vel, dtime * 0.5f);
madd_v3_v3v3fl(states[1].vel, states->vel, acceleration, dtime * 0.5f);
states[1].time = dtime * 0.5f;
/*fra=sim->psys->cfra+0.5f*dfra;*/
// fra = sim->psys->cfra + 0.5f * dfra;
}
else {
madd_v3_v3v3fl(pa->state.co, states->co, states[1].vel, dtime);
@ -1511,7 +1511,7 @@ static void integrate_particle(
madd_v3_v3v3fl(states[1].co, states->co, dx[0], 0.5f);
madd_v3_v3v3fl(states[1].vel, states->vel, dv[0], 0.5f);
states[1].time = dtime * 0.5f;
/*fra=sim->psys->cfra+0.5f*dfra;*/
// fra = sim->psys->cfra + 0.5f * dfra;
break;
case 1:
madd_v3_v3v3fl(dx[1], states->vel, dv[0], 0.5f);
@ -1532,7 +1532,7 @@ static void integrate_particle(
add_v3_v3v3(states[3].co, states->co, dx[2]);
add_v3_v3v3(states[3].vel, states->vel, dv[2]);
states[3].time = dtime;
/*fra=cfra;*/
// fra = cfra;
break;
case 3:
add_v3_v3v3(dx[3], states->vel, dv[2]);

View File

@ -2915,7 +2915,7 @@ void do_versions_after_linking_280(FileData *fd, Main *bmain)
}
}
/* 2.8x dropped support for non-empty dupli instances. but propoer do-versionning was never
/* 2.8x dropped support for non-empty dupli instances. but proper do-versioning was never
* done correctly. So added here as a 'safe' place version wise, always better than in
* readfile lib-linking code! */
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {

View File

@ -492,7 +492,7 @@ void do_versions_after_setup(Main *new_bmain, BlendFileReadReport *reports)
* decision to apply some versioning on some data should mostly rely on the data itself.
* - Unlike the regular do_version code, this one should _not_ be assumed as 'valid forever'.
* It is closer to the Editing or BKE code in that respect, changes to the logic or data
* model of an ID will require carefull update here as well.
* model of an ID will require a careful update here as well.
*
* Another critical weakness of this code is that it is currently _not_ performed on data linked
* during an editing session, but only on data linked while reading a whole blendfile. This will

View File

@ -206,7 +206,7 @@ void KuwaharaAnisotropicOperation::execute_pixel_sampled(float output[4],
float2 rotated_disk_point = M_SQRT1_2 *
float2(disk_point.x - disk_point.y, disk_point.x + disk_point.y);
/* Finally, we compute every other odd-index 4 weights starting from the 45 degreed rotated
/* Finally, we compute every other odd-index 4 weights starting from the 45 degree rotated
* disk point. */
float2 rotated_polynomial = sector_center_overlap_parameter -
cross_sector_overlap_parameter * square(rotated_disk_point);
@ -453,7 +453,7 @@ void KuwaharaAnisotropicOperation::update_memory_buffer_partial(MemoryBuffer *ou
float2 rotated_disk_point = M_SQRT1_2 * float2(disk_point.x - disk_point.y,
disk_point.x + disk_point.y);
/* Finally, we compute every other odd-index 4 weights starting from the 45 degreed rotated
/* Finally, we compute every other odd-index 4 weights starting from the 45 degree rotated
* disk point. */
float2 rotated_polynomial = sector_center_overlap_parameter -
cross_sector_overlap_parameter * square(rotated_disk_point);

View File

@ -650,7 +650,7 @@ GPUShader *EEVEE_shaders_cryptomatte_sh_get(bool is_hair)
/** \} */
/* -------------------------------------------------------------------- */
/** \name Raytraced Reflections
/** \name Ray-Traced Reflections
* \{ */
GPUShader *EEVEE_shaders_effect_reflection_trace_sh_get()

View File

@ -2,13 +2,15 @@
#pragma BLENDER_REQUIRE(common_math_lib.glsl)
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
/*uniform sampler2D colorBuffer;
#if 0
uniform sampler2D colorBuffer;
uniform depth2D depthBuffer;
uniform sampler2D colorHistoryBuffer;
uniform mat4 prevViewProjectionMatrix;
out vec4 FragColor;*/
out vec4 FragColor;
#endif
#ifdef USE_REPROJECTION

View File

@ -800,7 +800,7 @@ bool match_slope_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float
}
/* This delta values are used to get the relationship between the bookend keys and the
* reference keys beyong those. */
* reference keys beyond those. */
const float y_delta = beyond_key.vec[1][1] - reference_key->vec[1][1];
const float x_delta = beyond_key.vec[1][0] - reference_key->vec[1][0];

View File

@ -1179,7 +1179,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
EditBone *ebone = ED_armature_ebone_find_name(arm->edbo, name_flip);
if (!ebone) {
/* The ebone_iter is unique and mirrorable. */
/* The ebone_iter is unique and mirror-able. */
continue;
}

View File

@ -110,7 +110,7 @@ class ReadMapPixelF0D : public UnaryFunction0D<float> {
};
// ReadSteerableViewMapPixel
/** Reads a pixel in one of the level of one of the steerable viewmaps. */
/** Reads a pixel in one of the level of one of the steerable view-maps. */
class ReadSteerableViewMapPixelF0D : public UnaryFunction0D<float> {
private:
uint _orientation;

View File

@ -148,7 +148,7 @@ class GetCompleteViewMapDensityF1D : public UnaryFunction1D<double> {
};
// GetDirectionalViewMapDensity
/** Returns the density evaluated for an Interface1D in of the steerable viewmaps image.
/** Returns the density evaluated for an Interface1D in of the steerable view-maps image.
* The direction telling which Directional map to choose is explicitly specified by the user.
* The density is evaluated for a set of points along the Interface1D
* (using the ReadSteerableViewMapPixelF0D functor)

View File

@ -4,7 +4,7 @@
/** \file
* \ingroup freestyle
* \brief Class to define a chain of viewedges.
* \brief Class to define a chain of view-edges.
*/
#include "Chain.h"

View File

@ -6,7 +6,7 @@
/** \file
* \ingroup freestyle
* \brief Class to define a chain of viewedges.
* \brief Class to define a chain of view-edges.
*/
#include "Curve.h"

View File

@ -198,7 +198,7 @@ class Operators {
UnaryPredicate1D &pred,
float sampling = 0.0f);
/** Sorts the current set of chains (or viewedges)
/** Sorts the current set of chains (or view-edges)
* according to the comparison predicate given as argument.
* \param pred:
* The binary predicate used for the comparison

View File

@ -101,7 +101,7 @@ std::string cache_or_get_image_file(Main *bmain, Scene *scene, Image *image, Ima
ipf->packedfile,
PF_WRITE_LOCAL);
/* Take first succesfully unpacked image. */
/* Take first successfully unpacked image. */
if (cached_path != nullptr) {
if (file_path.empty()) {
file_path = cached_path;

View File

@ -57,8 +57,8 @@ class USDMeshReader : public USDGeomReader {
bool topology_changed(const Mesh *existing_mesh, double motionSampleTime) override;
/**
* If the USD mesh prim has a valid UsdSkel schema defined, return the USD path
* string to the bound skeleton, if any. Returns the empty string if no skeleton
* If the USD mesh prim has a valid `UsdSkel` schema defined, return the USD path
* string to the bound skeleton, if any. Returns the empty string if no skeleton
* binding is defined.
*
* The returned path is currently used to match armature modifiers with armature

View File

@ -335,7 +335,7 @@ void USDStageReader::collect_readers(Main *bmain)
void USDStageReader::process_armature_modifiers() const
{
/* Iteratate over the skeleton readers to create the
/* Iterate over the skeleton readers to create the
* armature object map, which maps a USD skeleton prim
* path to the corresponding armature object. */
std::map<std::string, Object *> usd_path_to_armature;

View File

@ -206,7 +206,7 @@ void import_skeleton_curves(Main *bmain,
/* The curve for each joint represents the transform relative
* to the bind transform in joint-local space. I.e.,
*
* jointLocalTransform * inv(jointLocalBindTransform)
* `jointLocalTransform * inv(jointLocalBindTransform)`
*
* There doesn't appear to be a way to query the joint-local
* bind transform through the API, so we have to compute it
@ -418,8 +418,8 @@ void import_blendshapes(Main *bmain,
KeyBlock *kb = BKE_keyblock_add(key, "Basis");
BKE_keyblock_convert_from_mesh(mesh, key, kb);
/* Keep track of the shapkeys we're adding, for
* validation when creating curves later. */
/* Keep track of the shape-keys we're adding,
* for validation when creating curves later. */
std::set<pxr::TfToken> shapekey_names;
for (int i = 0; i < targets.size(); ++i) {
@ -431,7 +431,7 @@ void import_blendshapes(Main *bmain,
continue;
}
/* Get the blend shape offests. */
/* Get the blend shape offsets. */
if (!blendshape.GetOffsetsAttr().HasAuthoredValue()) {
/* Blend shape has no authored offsets. */
continue;
@ -576,7 +576,7 @@ void import_blendshapes(Main *bmain,
for (auto blendshape_name : blendshapes) {
if (shapekey_names.find(blendshape_name) == shapekey_names.end()) {
/* We didn't create a shapekey fo this blendshape, so we don't
/* We didn't create a shape-key for this blend-shape, so we don't
* create a curve and insert a null placeholder in the curve array. */
curves.push_back(nullptr);
continue;
@ -706,13 +706,13 @@ void import_skeleton(Main *bmain,
/* Check if any bone matrices have negative determinants,
* indicating negative scales, possibly due to mirroring
* operations. Such matrices can't be propery converted
* operations. Such matrices can't be properly converted
* to Blender's axis/roll bone representation (see
* https://projects.blender.org/blender/blender/issues/82930).
* If we detect such matrices, we will flag an error and won't
* try to import the animation, since the rotations would
* be incorrect in such cases. Unfortunately, the Pixar
* UsdSkel examples of the "HumanFemale" suffer from
* be incorrect in such cases. Unfortunately, the Pixar
* `UsdSkel` examples of the "HumanFemale" suffer from
* this issue. */
bool negative_determinant = false;
@ -903,9 +903,8 @@ void import_mesh_skel_bindings(Main *bmain, Object *mesh_obj, const pxr::UsdPrim
return;
}
/* Element size specifies the number of joints that might influece a given point.
* This is the stride we take when accessing the indices and weights for a
* given point. */
/* Element size specifies the number of joints that might influence a given point.
* This is the stride we take when accessing the indices and weights for a given point. */
int joint_indices_elem_size = joint_indices_primvar.GetElementSize();
int joint_weights_elem_size = joint_weights_primvar.GetElementSize();

View File

@ -18,9 +18,9 @@ namespace blender::io::usd {
struct ImportSettings;
/**
* This file contains utilities for converting between UsdSkel data and
* This file contains utilities for converting between `UsdSkel` data and
* Blender armatures and shape keys. The following is a reference on the
* UsdSkel API:
* `UsdSkel` API:
*
* https://openusd.org/23.05/api/usd_skel_page_front.html
*/
@ -34,7 +34,7 @@ struct ImportSettings;
*
* \param bmain: Main pointer
* \param mesh_obj: Mesh object to which imported shape keys will be added
* \param prim: The USD primitive from which blendshapes will be imported
* \param prim: The USD primitive from which blend-shapes will be imported
* \param import_anim: Whether to import time-sampled weights as shape key
* animation curves
*/
@ -49,7 +49,7 @@ void import_blendshapes(Main *bmain,
* imported as bone animation curves.
*
* \param bmain: Main pointer
* \param arm_obj: Armature object to which the bone hierachy will be added
* \param arm_obj: Armature object to which the bone hierarchy will be added
* \param skel: The USD skeleton from which bones and animation will be imported
* \param import_anim: Whether to import time-sampled joint transforms as bone
* animation curves

View File

@ -791,16 +791,16 @@ static int cg_filtered(lfVector *ldV, fmatrix3x3 *lA, lfVector *lB, lfVector *z,
a = s / dot_lfvector(d, q, numverts);
/* X = X + d*a; */
/* `X = X + d*a;` */
add_lfvector_lfvectorS(ldV, ldV, d, a, numverts);
/* r = r - q*a; */
/* `r = r - q*a;` */
sub_lfvector_lfvectorS(r, r, q, a, numverts);
s_prev = s;
s = dot_lfvector(r, r, numverts);
// d = r+d*(s/s_prev);
/* `d = r+d*(s/s_prev);` */
add_lfvector_lfvectorS(d, r, d, (s / s_prev), numverts);
filter(d, S);

View File

@ -1517,7 +1517,7 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt
int icon = ED_file_extension_icon((char *)stra->strings[a]);
wmDragPath *path_data = WM_drag_create_path_data((char *)stra->strings[a]);
WM_event_start_drag(C, icon, WM_DRAG_PATH, path_data, 0.0, WM_DRAG_NOP);
/* void poin should point to string, it makes a copy */
/* Void pointer should point to string, it makes a copy. */
break; /* only one drop element supported now */
}
}

View File

@ -87,6 +87,7 @@ dict_custom = {
"decrement",
"decrementing",
"deduplicate",
"deduplicated",
"deduplicates",
"deduplicating",
"deduplication",