Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2023-03-03 10:09:20 +11:00
parent 99e90615d7
commit 05324e2e3c
16 changed files with 47 additions and 39 deletions

View File

@ -192,8 +192,8 @@ class GHOST_Context : public GHOST_IContext {
};
/**
* Gets the Vulkan backbuffer related resource handles associated with the Vulkan context.
* Needs to be called after each swap event as the backbuffer will change.
* Gets the Vulkan back-buffer related resource handles associated with the Vulkan context.
* Needs to be called after each swap event as the back-buffer will change.
*
* \param r_image: After calling this function the VkImage
* referenced by this parameter will contain the VKImage handle

View File

@ -23,14 +23,18 @@ typedef enum eMeshFairingDepth {
MESH_FAIRING_DEPTH_TANGENCY = 2,
} eMeshFairingDepth;
/* affect_vertices is used to define the fairing area. Indexed by vertex index, set to true when
* the vertex should be modified by fairing. */
/**
* Affect_vertices is used to define the fairing area. Indexed by vertex index, set to true when
* the vertex should be modified by fairing.
*/
void BKE_bmesh_prefair_and_fair_verts(struct BMesh *bm,
bool *affect_verts,
eMeshFairingDepth depth);
/* This function can optionally use the vertex coordinates of deform_mverts to read and write the
* fairing result. When NULL, the function will use mesh positions directly. */
/**
* This function can optionally use the vertex coordinates of deform_mverts to read and write the
* fairing result. When NULL, the function will use mesh positions directly.
*/
void BKE_mesh_prefair_and_fair_verts(struct Mesh *mesh,
float (*deform_vert_positions)[3],
bool *affect_verts,

View File

@ -15,7 +15,8 @@ struct ReportList;
* Compute simplified tangent space normals, i.e.
* tangent vector + sign of bi-tangent one, which combined with
* split normals can be used to recreate the full tangent space.
* NOTE: * The mesh should be made of only tris and quads!
*
* \note The mesh should be made of only triangles and quads!
*/
void BKE_mesh_calc_loop_tangent_single_ex(const float (*vert_positions)[3],
int numVerts,
@ -31,7 +32,7 @@ void BKE_mesh_calc_loop_tangent_single_ex(const float (*vert_positions)[3],
* Wrapper around BKE_mesh_calc_loop_tangent_single_ex, which takes care of most boilerplate code.
* \note
* - There must be a valid loop's CD_NORMALS available.
* - The mesh should be made of only tris and quads!
* - The mesh should be made of only triangles and quads!
*/
void BKE_mesh_calc_loop_tangent_single(struct Mesh *mesh,
const char *uvmap,

View File

@ -1399,7 +1399,7 @@ void BKE_blendfile_override(BlendfileLinkAppendContext *lapp_context,
* reference to be indirectly linked.
*
* This is more of an heuristic for 'as best as possible' user feedback in the UI
* (Outliner), which is expected to be valid in almost all practical usecases. Direct or
* (Outliner), which is expected to be valid in almost all practical use-cases. Direct or
* indirect linked status is properly checked before saving .blend file. */
id->tag &= ~LIB_TAG_EXTERN;
id->tag |= LIB_TAG_INDIRECT;

View File

@ -227,7 +227,7 @@ static AdrBit2Path ob_layer_bits[] = {
} \
(void)0
/* This function checks if a Blocktype+Adrcode combo, returning a mapping table */
/* This function checks if a `blocktype+adrcode` combination, returning a mapping table. */
static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *tot)
{
/* Object layers */

View File

@ -451,7 +451,7 @@ static void prefair_and_fair_verts(FairingContext *fairing_context,
bool *affected_verts,
const eMeshFairingDepth depth)
{
/* Prefair. */
/* Pre-fair. */
UniformVertexWeight *uniform_vertex_weights = new UniformVertexWeight(fairing_context);
UniformLoopWeight *uniform_loop_weights = new UniformLoopWeight();
fairing_context->fair_verts(affected_verts, depth, uniform_vertex_weights, uniform_loop_weights);

View File

@ -8725,7 +8725,7 @@ static int edbm_point_normals_modal(bContext *C, wmOperator *op, const wmEvent *
params.calc_looptri = true;
params.calc_normals = false;
params.is_destructive = false;
/* Recheck bools. */
/* Recheck booleans. */
EDBM_update(static_cast<Mesh *>(obedit->data), &params);
point_normals_update_header(C, op);

View File

@ -8,7 +8,7 @@
#include <ctype.h>
#include <float.h>
#include <math.h>
#include <stddef.h> /* for offsetof */
#include <stddef.h> /* For `offsetof`. */
#include <stdlib.h>
#include <string.h>
#include <time.h>
@ -231,7 +231,7 @@ int ED_object_in_mode_to_index(const Scene *scene,
BLI_assert(ob != nullptr);
/* NOTE: the `v3d` is always nullptr because the purpose of this function is to return
* a reusable index, using the `v3d` only increases the chance the index may become
* invalidparams. */
* invalid-parameters. */
int index = -1;
int i = 0;
FOREACH_BASE_IN_MODE_BEGIN (scene, view_layer, nullptr, -1, mode, base_iter) {

View File

@ -2995,9 +2995,9 @@ static int view3d_select_exec(bContext *C, wmOperator *op)
if (obact && obact->type == OB_GPENCIL && GPENCIL_ANY_MODE((bGPdata *)obact->data)) {
/* Prevent acting on Grease Pencil (when not in object mode), it implements its own selection
* operator in other modes. We might still fall trough to here (because that operator uses
* OPERATOR_PASS_THROUGH to make tweak work) but if we dont stop here code below assumes we are
* in object mode it might falsely toggle object selection. Alternatively, this could be put in
* the poll funtion instead. */
* OPERATOR_PASS_THROUGH to make tweak work) but if we don't stop here code below assumes we
* are in object mode it might falsely toggle object selection. Alternatively, this could be
* put in the poll function instead. */
return OPERATOR_PASS_THROUGH | OPERATOR_CANCELLED;
}

View File

@ -2808,19 +2808,19 @@ static void uv_map_mirror(BMFace *efa,
}
}
/** Store a face and it's current branch on the generalized atan2 function.
/**
* Store a face and it's current branch on the generalized atan2 function.
*
* In complex analysis, we can generalize the arctangent function
* In complex analysis, we can generalize the `arctangent` function
* into a multi-valued function that is "almost everywhere continuous"
* in the complex plane.
*
* The downside is that we need to keep track of which "branch" of the
* multi-valued function we are currently on.
*
* \note Even though atan2(a+bi, c+di) is now (multiply) defined for all
* \note Even though `atan2(a+bi, c+di)` is now (multiply) defined for all
* complex inputs, we will only evaluate it with `b==0` and `d==0`.
*/
struct uv_face_branch {
BMFace *efa;
float branch;
@ -2830,7 +2830,7 @@ struct uv_face_branch {
*
* Heuristics are used in #uv_map_mirror to improve winding.
*
* if `fan` is true, faces with UVs at the pole have corrections appled to fan the UVs.
* if `fan` is true, faces with UVs at the pole have corrections applied to fan the UVs.
*
* if `use_seams` is true, the unwrapping will flood fill across the mesh, using
* seams to mark boundaries, and #BM_ELEM_TAG to prevent revisiting faces.
@ -2851,7 +2851,7 @@ static float uv_sphere_project(const Scene *scene,
return max_u;
}
/* Similar to BM_mesh_calc_face_groups with added connectivity information. */
/* Similar to #BM_mesh_calc_face_groups with added connectivity information. */
blender::Vector<uv_face_branch> stack;
stack.append({efa_init, branch_init});

View File

@ -50,7 +50,7 @@ VKContext::VKContext(void *ghost_window, void *ghost_context)
VKBackend::capabilities_init(*this);
/* For offscreen contexts. Default framebuffer is empty. */
/* For off-screen contexts. Default frame-buffer is empty. */
active_fb = back_left = new VKFrameBuffer("back_left");
}

View File

@ -42,7 +42,8 @@ struct ExportJobData {
Depsgraph *depsgraph;
wmWindowManager *wm;
char unarchived_filepath[FILE_MAX]; /* unarchived_filepath is used for usda/usdc/usd export. */
/** Unarchived_filepath is used for USDA/USDC/USD export. */
char unarchived_filepath[FILE_MAX];
char usdz_filepath[FILE_MAX];
USDExportParams params;

View File

@ -212,21 +212,21 @@ static void createVertRingMap(const int mvert_tot,
/**
* This method computes the Laplacian Matrix and Differential Coordinates
* for all vertex in the mesh..
* for all vertex in the mesh.
* The Linear system is LV = d
* Where L is Laplacian Matrix, V as the vertices in Mesh, d is the differential coordinates
* The Laplacian Matrix is computes as a
* Lij = sum(Wij) (if i == j)
* Lij = Wij (if i != j)
* Wij is weight between vertex Vi and vertex Vj, we use cotangent weight
* The Laplacian Matrix is computes as a:
* `Lij = sum(Wij) (if i == j)`
* `Lij = Wij (if i != j)`
* `Wij` is weight between vertex Vi and vertex Vj, we use cotangent weight
*
* The Differential Coordinate is computes as a
* di = Vi * sum(Wij) - sum(Wij * Vj)
* Where :
* The Differential Coordinate is computes as a:
* `di = Vi * sum(Wij) - sum(Wij * Vj)`
* Where:
* di is the Differential Coordinate i
* sum (Wij) is the sum of all weights between vertex Vi and its vertices neighbors (Vj)
* sum (Wij * Vj) is the sum of the product between vertex neighbor Vj and weight Wij
* for all neighborhood.
* `sum (Wij)` is the sum of all weights between vertex Vi and its vertices neighbors (`Vj`).
* `sum (Wij * Vj)` is the sum of the product between vertex neighbor `Vj` and weight `Wij`
* for all neighborhood.
*
* This Laplacian Matrix is described in the paper:
* Desbrun M. et.al, Implicit fairing of irregular meshes using diffusion and curvature flow,

View File

@ -7082,7 +7082,7 @@ static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna)
PyObject_SetAttr(newclass, bpy_intern_str_bl_rna, item);
Py_DECREF(item);
/* Add staticmethods and classmethods. */
/* Add `staticmethod` and `classmethod` functions. */
{
const PointerRNA func_ptr = {NULL, srna, NULL};
const ListBase *lb;
@ -7092,7 +7092,7 @@ static void pyrna_subtype_set_rna(PyObject *newclass, StructRNA *srna)
for (link = lb->first; link; link = link->next) {
FunctionRNA *func = (FunctionRNA *)link;
const int flag = RNA_function_flag(func);
if ((flag & FUNC_NO_SELF) && /* Is staticmethod or classmethod. */
if ((flag & FUNC_NO_SELF) && /* Is `staticmethod` or `classmethod`. */
(flag & FUNC_REGISTER) == false) /* Is not for registration. */
{
/* We may want to set the type of this later. */

View File

@ -155,7 +155,8 @@ static void pointdensity_cache_psys(
ParticleSimulationData sim = {NULL};
ParticleData *pa = NULL;
float cfra = BKE_scene_ctime_get(scene);
int i /*, Childexists*/ /* UNUSED */;
int i;
// int childexists = 0; /* UNUSED */
int total_particles;
int data_used;
float *data_vel, *data_life;

View File

@ -54,6 +54,7 @@ dict_custom = {
"canonicalizing",
"catadioptric",
"checksums",
"chrominance",
"clearcoat",
"codecs",
"collapser",