Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-26 14:35:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-26 14:50:48 +0300
commitf1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch)
tree0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/bmesh
parentfae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff)
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/bmesh_class.h8
-rw-r--r--source/blender/bmesh/intern/bmesh_error.h23
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c38
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_normals.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h16
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_query.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.h2
-rw-r--r--source/blender/bmesh/operators/bmo_inset.c2
-rw-r--r--source/blender/bmesh/operators/bmo_smooth_laplacian.c24
-rw-r--r--source/blender/bmesh/tools/bmesh_beautify.c8
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c4
-rw-r--r--source/blender/bmesh/tools/bmesh_intersect.c2
16 files changed, 75 insertions, 68 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index f60fc72f8a9..61ec1bc679e 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -89,9 +89,9 @@ typedef struct BMHeader {
BLI_STATIC_ASSERT((sizeof(BMHeader) <= 16), "BMHeader size has grown!");
-/* note: need some way to specify custom locations for custom data layers. so we can
+/* NOTE: need some way to specify custom locations for custom data layers. so we can
* make them point directly into structs. and some way to make it only happen to the
- * active layer, and properly update when switching active layers.*/
+ * active layer, and properly update when switching active layers. */
typedef struct BMVert {
BMHeader head;
@@ -267,7 +267,7 @@ typedef struct BMFace {
BMHeader head;
#ifdef USE_BMESH_HOLES
- int totbounds; /*total boundaries, is one plus the number of holes in the face*/
+ int totbounds; /* Total boundaries, is one plus the number of holes in the face. */
ListBase loops;
#else
BMLoop *l_first;
@@ -545,7 +545,7 @@ typedef bool (*BMLoopPairFilterFunc)(const BMLoop *, const BMLoop *, void *user_
#define BM_ELEM_CD_GET_FLOAT_AS_UCHAR(ele, offset) \
(BLI_assert(offset != -1), (uchar)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f))
-/*forward declarations*/
+/* Forward declarations. */
#ifdef USE_BMESH_HOLES
# define BM_FACE_FIRST_LOOP(p) (((BMLoopList *)((p)->loops.first))->first)
diff --git a/source/blender/bmesh/intern/bmesh_error.h b/source/blender/bmesh/intern/bmesh_error.h
index 41d02e334fb..587e33e7dfd 100644
--- a/source/blender/bmesh/intern/bmesh_error.h
+++ b/source/blender/bmesh/intern/bmesh_error.h
@@ -24,12 +24,12 @@
/*----------- bmop error system ----------*/
-/* pushes an error onto the bmesh error stack.
+/* Pushes an error onto the bmesh error stack.
* if msg is null, then the default message for the `errcode` is used. */
void BMO_error_raise(BMesh *bm, BMOperator *owner, int errcode, const char *msg);
-/* gets the topmost error from the stack.
- * returns error code or 0 if no error.*/
+/* Gets the topmost error from the stack.
+ * returns error code or 0 if no error. */
int BMO_error_get(BMesh *bm, const char **msg, BMOperator **op);
bool BMO_error_occurred(BMesh *bm);
@@ -37,23 +37,22 @@ bool BMO_error_occurred(BMesh *bm);
int BMO_error_pop(BMesh *bm, const char **msg, BMOperator **op);
void BMO_error_clear(BMesh *bm);
-/* this is meant for handling errors, like self-intersection test failures.
+/* This is meant for handling errors, like self-intersection test failures.
* it's dangerous to handle errors in general though, so disabled for now. */
-/* catches an error raised by the op pointed to by catchop.
+/* Catches an error raised by the op pointed to by catchop.
* errorcode is either the errorcode, or BMERR_ALL for any
- * error.*/
+ * error. */
-/* not yet implemented.
- * int BMO_error_catch_op(BMesh *bm, BMOperator *catchop, int errorcode, char **msg);
- */
+/* Not yet implemented. */
+// int BMO_error_catch_op(BMesh *bm, BMOperator *catchop, int errorcode, char **msg);
#define BM_ELEM_INDEX_VALIDATE(_bm, _msg_a, _msg_b) \
BM_mesh_elem_index_validate(_bm, __FILE__ ":" STRINGIFY(__LINE__), __func__, _msg_a, _msg_b)
/*------ error code defines -------*/
-/*error messages*/
+/** Error messages. */
enum {
BMERR_CONNECTVERT_FAILED = 1,
BMERR_DISSOLVEFACES_FAILED,
@@ -71,8 +70,8 @@ enum {
# define _BMESH_DUMMY_ABORT() (void)0
#endif
-/* this is meant to be higher level than BLI_assert(),
- * its enabled even when in Release mode*/
+/* This is meant to be higher level than BLI_assert(),
+ * its enabled even when in Release mode. */
#define BMESH_ASSERT(a) \
(void)((!(a)) ? ((fprintf(stderr, \
"BMESH_ASSERT failed: %s, %s(), %d at \'%s\'\n", \
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index f2e7a48a16c..470aceeb756 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -61,11 +61,11 @@ typedef enum BMIterType {
BM_LOOPS_OF_FACE = 11,
/* returns elements from all boundaries, and returns
* the first element at the end to flag that we're entering
- * a different face hole boundary*/
+ * a different face hole boundary. */
// BM_ALL_LOOPS_OF_FACE = 12,
/* iterate through loops around this loop, which are fetched
* from the other faces in the radial cycle surrounding the
- * input loop's edge.*/
+ * input loop's edge. */
BM_LOOPS_OF_LOOP = 12,
BM_LOOPS_OF_EDGE = 13,
} BMIterType;
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index ff6c359138a..99feae1d66c 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -68,8 +68,8 @@ void BM_mesh_elem_hflag_disable_all(BMesh *bm,
const char hflag,
const bool respecthide);
-/* individual element select functions, BM_elem_select_set is a shortcut for these
- * that automatically detects which one to use*/
+/* Individual element select functions, BM_elem_select_set is a shortcut for these
+ * that automatically detects which one to use. */
void BM_vert_select_set(BMesh *bm, BMVert *v, const bool select);
void BM_edge_select_set(BMesh *bm, BMEdge *e, const bool select);
void BM_face_select_set(BMesh *bm, BMFace *f, const bool select);
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index 80028564ff2..b2958a9e744 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -854,7 +854,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const
for (i = totvert, ve = verts_copy + totvert - 1, vep = verts_pool + totvert - 1; i--;
ve--, vep--) {
*ve = **vep;
- /* printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]);*/
+ // printf("*vep: %p, verts_pool[%d]: %p\n", *vep, i, verts_pool[i]);
if (cd_vert_pyptr != -1) {
void **pyptr = BM_ELEM_CD_GET_VOID_P(((BMElem *)ve), cd_vert_pyptr);
pyptrs[i] = *pyptr;
@@ -990,7 +990,7 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const
/* Verts' pointers, only edge pointers... */
if (eptr_map) {
BM_ITER_MESH (ve, &iter, bm, BM_VERTS_OF_MESH) {
- /* printf("Vert e: %p -> %p\n", ve->e, BLI_ghash_lookup(eptr_map, ve->e));*/
+ // printf("Vert e: %p -> %p\n", ve->e, BLI_ghash_lookup(eptr_map, ve->e));
if (ve->e) {
ve->e = BLI_ghash_lookup(eptr_map, ve->e);
BLI_assert(ve->e);
@@ -1004,22 +1004,30 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const
if (vptr_map || eptr_map) {
BM_ITER_MESH (ed, &iter, bm, BM_EDGES_OF_MESH) {
if (vptr_map) {
- /* printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, ed->v1));*/
- /* printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, ed->v2));*/
+#if 0
+ printf("Edge v1: %p -> %p\n", ed->v1, BLI_ghash_lookup(vptr_map, ed->v1));
+ printf("Edge v2: %p -> %p\n", ed->v2, BLI_ghash_lookup(vptr_map, ed->v2));
+#endif
ed->v1 = BLI_ghash_lookup(vptr_map, ed->v1);
ed->v2 = BLI_ghash_lookup(vptr_map, ed->v2);
BLI_assert(ed->v1);
BLI_assert(ed->v2);
}
if (eptr_map) {
- /* printf("Edge v1_disk_link prev: %p -> %p\n", ed->v1_disk_link.prev,*/
- /* BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev));*/
- /* printf("Edge v1_disk_link next: %p -> %p\n", ed->v1_disk_link.next,*/
- /* BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next));*/
- /* printf("Edge v2_disk_link prev: %p -> %p\n", ed->v2_disk_link.prev,*/
- /* BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev));*/
- /* printf("Edge v2_disk_link next: %p -> %p\n", ed->v2_disk_link.next,*/
- /* BLI_ghash_lookup(eptr_map, ed->v2_disk_link.next));*/
+#if 0
+ printf("Edge v1_disk_link prev: %p -> %p\n",
+ ed->v1_disk_link.prev,
+ BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev));
+ printf("Edge v1_disk_link next: %p -> %p\n",
+ ed->v1_disk_link.next,
+ BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next));
+ printf("Edge v2_disk_link prev: %p -> %p\n",
+ ed->v2_disk_link.prev,
+ BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev));
+ printf("Edge v2_disk_link next: %p -> %p\n",
+ ed->v2_disk_link.next,
+ BLI_ghash_lookup(eptr_map, ed->v2_disk_link.next));
+#endif
ed->v1_disk_link.prev = BLI_ghash_lookup(eptr_map, ed->v1_disk_link.prev);
ed->v1_disk_link.next = BLI_ghash_lookup(eptr_map, ed->v1_disk_link.next);
ed->v2_disk_link.prev = BLI_ghash_lookup(eptr_map, ed->v2_disk_link.prev);
@@ -1036,17 +1044,17 @@ void BM_mesh_remap(BMesh *bm, const uint *vert_idx, const uint *edge_idx, const
BM_ITER_MESH (fa, &iter, bm, BM_FACES_OF_MESH) {
BM_ITER_ELEM (lo, &iterl, fa, BM_LOOPS_OF_FACE) {
if (vptr_map) {
- /* printf("Loop v: %p -> %p\n", lo->v, BLI_ghash_lookup(vptr_map, lo->v));*/
+ // printf("Loop v: %p -> %p\n", lo->v, BLI_ghash_lookup(vptr_map, lo->v));
lo->v = BLI_ghash_lookup(vptr_map, lo->v);
BLI_assert(lo->v);
}
if (eptr_map) {
- /* printf("Loop e: %p -> %p\n", lo->e, BLI_ghash_lookup(eptr_map, lo->e));*/
+ // printf("Loop e: %p -> %p\n", lo->e, BLI_ghash_lookup(eptr_map, lo->e));
lo->e = BLI_ghash_lookup(eptr_map, lo->e);
BLI_assert(lo->e);
}
if (fptr_map) {
- /* printf("Loop f: %p -> %p\n", lo->f, BLI_ghash_lookup(fptr_map, lo->f));*/
+ // printf("Loop f: %p -> %p\n", lo->f, BLI_ghash_lookup(fptr_map, lo->f));
lo->f = BLI_ghash_lookup(fptr_map, lo->f);
BLI_assert(lo->f);
}
diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c
index 3e3fa2a2d9d..db09bbff97c 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_normals.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c
@@ -1546,7 +1546,7 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops, const bool do
/* Using face history allows to select a single loop from a single face...
* Note that this is O(n^2) piece of code,
* but it is not designed to be used with huge selection sets,
- * rather with only a few items selected at most.*/
+ * rather with only a few items selected at most. */
/* Goes from last selected to the first selected element. */
for (ese = bm->selected.last; ese; ese = ese->prev) {
if (ese->htype == BM_FACE) {
diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c
index c2c5dc24fa9..b61ef47351a 100644
--- a/source/blender/bmesh/intern/bmesh_mods.c
+++ b/source/blender/bmesh/intern/bmesh_mods.c
@@ -962,7 +962,7 @@ bool BM_edge_rotate_check_beauty(BMEdge *e, BMLoop *l1, BMLoop *l2)
{
/* Stupid check for now:
* Could compare angles of surrounding edges
- * before & after, but this is OK.*/
+ * before & after, but this is OK. */
return (len_squared_v3v3(e->v1->co, e->v2->co) > len_squared_v3v3(l1->v->co, l2->v->co));
}
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index 706979abeba..d09c0ee428d 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -256,7 +256,7 @@ typedef struct BMO_FlagSet {
} BMO_FlagSet;
/* please ignore all these structures, don't touch them in tool code, except
- * for when your defining an operator with BMOpDefine.*/
+ * for when your defining an operator with BMOpDefine. */
typedef struct BMOpSlot {
const char *slot_name; /* pointer to BMOpDefine.slot_args */
@@ -345,16 +345,16 @@ typedef struct BMOpDefine {
/* data types that use pointers (arrays, etc) should never
* have it set directly. and never use BMO_slot_ptr_set to
- * pass in a list of edges or any arrays, really.*/
+ * pass in a list of edges or any arrays, really. */
void BMO_op_init(BMesh *bm, BMOperator *op, const int flag, const char *opname);
/* executes an operator, pushing and popping a new tool flag
- * layer as appropriate.*/
+ * layer as appropriate. */
void BMO_op_exec(BMesh *bm, BMOperator *op);
/* finishes an operator (though note the operator's tool flag is removed
- * after it finishes executing in BMO_op_exec).*/
+ * after it finishes executing in BMO_op_exec). */
void BMO_op_finish(BMesh *bm, BMOperator *op);
/* count the number of elements with the specified flag enabled.
@@ -369,7 +369,7 @@ int BMO_mesh_disabled_flag_count(BMesh *bm, const char htype, const short oflag)
void BMO_push(BMesh *bm, BMOperator *op);
void BMO_pop(BMesh *bm);
-/*executes an operator*/
+/* Executes an operator. */
bool BMO_op_callf(BMesh *bm, const int flag, const char *fmt, ...);
/* initializes, but doesn't execute an operator. this is so you can
@@ -538,7 +538,7 @@ void BMO_slot_buffer_hflag_disable(BMesh *bm,
/* puts every element of type 'type' (which is a bitmask) with header
* flag 'flag', into a slot. note: ignores hidden elements
- * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/
+ * (e.g. elements with header flag BM_ELEM_HIDDEN set). */
void BMO_slot_buffer_from_enabled_hflag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
@@ -548,7 +548,7 @@ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm,
/* puts every element of type 'type' (which is a bitmask) without
* header flag 'flag', into a slot. note: ignores hidden elements
- * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/
+ * (e.g. elements with header flag BM_ELEM_HIDDEN set). */
void BMO_slot_buffer_from_disabled_hflag(BMesh *bm,
BMOperator *op,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
@@ -571,7 +571,7 @@ int BMO_slot_map_count(BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_na
void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, const void *data);
/* flags all elements in a mapping. note that the mapping must only have
- * bmesh elements in it.*/
+ * bmesh elements in it. */
void BMO_slot_map_to_flag(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 2d9e244e54d..a701fe3eb85 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -20,7 +20,7 @@
* \ingroup bmesh
*/
-/*see comments in intern/bmesh_opdefines.c for documentation of specific operators*/
+/* See comments in `intern/bmesh_opdefines.c` for documentation of specific operators. */
/*--------defines/enumerations for specific operators-------*/
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c
index da407abfb21..1449df9925f 100644
--- a/source/blender/bmesh/intern/bmesh_query.c
+++ b/source/blender/bmesh/intern/bmesh_query.c
@@ -2365,7 +2365,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len)
for (int i = 0; i < len; i++) {
BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) {
if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) {
- /* check if all vers in this face are flagged*/
+ /* Check if all vers in this face are flagged. */
BMLoop *l_iter, *l_first;
if (is_init == false) {
diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h
index ce0f8ae8324..d0348aa11dc 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.h
+++ b/source/blender/bmesh/intern/bmesh_walkers.h
@@ -80,7 +80,7 @@ void *BMW_step(struct BMWalker *walker);
void BMW_end(struct BMWalker *walker);
int BMW_current_depth(BMWalker *walker);
-/*these are used by custom walkers*/
+/* These are used by custom walkers. */
void *BMW_current_state(BMWalker *walker);
void *BMW_state_add(BMWalker *walker);
void BMW_state_remove(BMWalker *walker);
diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c
index 9e8e330e87c..39f8f41432a 100644
--- a/source/blender/bmesh/operators/bmo_inset.c
+++ b/source/blender/bmesh/operators/bmo_inset.c
@@ -361,7 +361,7 @@ static void bmo_face_inset_individual(BMesh *bm,
madd_v3_v3fl(v_new_co, tvec, thickness);
- /* Set normal, add depth and write new vertex position*/
+ /* Set normal, add depth and write new vertex position. */
copy_v3_v3(l_iter->v->no, f->no);
if (depth != 0.0f) {
diff --git a/source/blender/bmesh/operators/bmo_smooth_laplacian.c b/source/blender/bmesh/operators/bmo_smooth_laplacian.c
index a9879ce025a..b2b93bfd003 100644
--- a/source/blender/bmesh/operators/bmo_smooth_laplacian.c
+++ b/source/blender/bmesh/operators/bmo_smooth_laplacian.c
@@ -36,17 +36,17 @@
#define SMOOTH_LAPLACIAN_MIN_EDGE_PERCENTAGE 0.15f
struct BLaplacianSystem {
- float *eweights; /* Length weights per Edge */
- float (*fweights)[3]; /* Cotangent weights per face */
- float *ring_areas; /* Total area per ring*/
- float *vlengths; /* Total sum of lengths(edges) per vertice*/
- float *vweights; /* Total sum of weights per vertice*/
- int numEdges; /* Number of edges*/
- int numFaces; /* Number of faces*/
- int numVerts; /* Number of verts*/
- short *zerola; /* Is zero area or length*/
-
- /* Pointers to data*/
+ float *eweights; /* Length weights per Edge. */
+ float (*fweights)[3]; /* Cotangent weights per face. */
+ float *ring_areas; /* Total area per ring. */
+ float *vlengths; /* Total sum of lengths(edges) per vertex. */
+ float *vweights; /* Total sum of weights per vertex. */
+ int numEdges; /* Number of edges. */
+ int numFaces; /* Number of faces. */
+ int numVerts; /* Number of verts. */
+ short *zerola; /* Is zero area or length. */
+
+ /* Pointers to data. */
BMesh *bm;
BMOperator *op;
LinearSolver *context;
@@ -343,7 +343,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys)
idv1 = BM_elem_index_get(vf[0]);
idv2 = BM_elem_index_get(vf[1]);
idv3 = BM_elem_index_get(vf[2]);
- /* Is ring if number of faces == number of edges around vertice*/
+ /* Is ring if number of faces == number of edges around vertice. */
i = BM_elem_index_get(f);
if (!vert_is_boundary(vf[0]) && sys->zerola[idv1] == 0) {
EIG_linear_solver_matrix_add(
diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c
index 2d9b35697ff..4ef165fe6c1 100644
--- a/source/blender/bmesh/tools/bmesh_beautify.c
+++ b/source/blender/bmesh/tools/bmesh_beautify.c
@@ -277,10 +277,10 @@ float BM_verts_calc_rotate_beauty(const BMVert *v1,
static float bm_edge_calc_rotate_beauty(const BMEdge *e, const short flag, const short method)
{
const BMVert *v1, *v2, *v3, *v4;
- v1 = e->l->prev->v; /* first vert co */
- v2 = e->l->v; /* e->v1 or e->v2*/
- v3 = e->l->radial_next->prev->v; /* second vert co */
- v4 = e->l->next->v; /* e->v1 or e->v2*/
+ v1 = e->l->prev->v; /* First vert co */
+ v2 = e->l->v; /* `e->v1` or `e->v2`. */
+ v3 = e->l->radial_next->prev->v; /* Second vert co */
+ v4 = e->l->next->v; /* `e->v1` or `e->v2`. */
return BM_verts_calc_rotate_beauty(v1, v2, v3, v4, flag, method);
}
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 82878c7618a..a1630d9d2ff 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -568,9 +568,9 @@ static bool bm_decim_triangulate_begin(BMesh *bm, int *r_edges_tri_tot)
pf_heap = NULL;
}
- /* adding new faces as we loop over faces
+ /* Adding new faces as we loop over faces
* is normally best avoided, however in this case its not so bad because any face touched twice
- * will already be triangulated*/
+ * will already be triangulated. */
BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
if (f->len > 3) {
has_cut |= bm_face_triangulate(bm,
diff --git a/source/blender/bmesh/tools/bmesh_intersect.c b/source/blender/bmesh/tools/bmesh_intersect.c
index cc980a81aad..d51661a08bb 100644
--- a/source/blender/bmesh/tools/bmesh_intersect.c
+++ b/source/blender/bmesh/tools/bmesh_intersect.c
@@ -379,7 +379,7 @@ static BMVert *bm_isect_edge_tri(struct ISectState *s,
} \
(void)0
- /* order tri, then order (1-2, 2-3)*/
+ /* Order tri, then order (1-2, 2-3). */
#define KEY_EDGE_TRI_ORDER(k) \
{ \
if (k[2] > k[3]) { \