diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 16:08:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 17:43:40 +0300 |
commit | 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch) | |
tree | 63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/bmesh | |
parent | 05f970847e12ce30e8c4c624677d94ae239ce2bc (diff) |
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
Diffstat (limited to 'source/blender/bmesh')
34 files changed, 66 insertions, 66 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index e3efeec951e..7aee93bb157 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -37,7 +37,7 @@ struct MLoopNorSpaceArray; struct BLI_mempool; -/* note: it is very important for BMHeader to start with two +/* NOTE: it is very important for BMHeader to start with two * pointers. this is a requirement of mempool's method of * iteration. * diff --git a/source/blender/bmesh/intern/bmesh_delete.c b/source/blender/bmesh/intern/bmesh_delete.c index f470361e5fb..9f2fb1370bb 100644 --- a/source/blender/bmesh/intern/bmesh_delete.c +++ b/source/blender/bmesh/intern/bmesh_delete.c @@ -205,7 +205,7 @@ void BMO_mesh_delete_oflag_context(BMesh *bm, const short oflag, const int type) /* BM functions * - * note! this is just a duplicate of the code above (bad!) + * NOTE: this is just a duplicate of the code above (bad!) * but for now keep in sync, its less hassle than having to create bmesh operator flags, * each time we need to remove some geometry. */ diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h index 470aceeb756..4bb83492548 100644 --- a/source/blender/bmesh/intern/bmesh_iterators.h +++ b/source/blender/bmesh/intern/bmesh_iterators.h @@ -158,7 +158,7 @@ typedef void (*BMIter__begin_cb)(void *); typedef void *(*BMIter__step_cb)(void *); /* Iterator Structure */ -/* note: some of these vars are not used, +/* NOTE: some of these vars are not used, * so they have been commented to save stack space since this struct is used all over */ typedef struct BMIter { /* keep union first */ @@ -180,7 +180,7 @@ typedef struct BMIter { BMIter__begin_cb begin; BMIter__step_cb step; - int count; /* note, only some iterators set this, don't rely on it */ + int count; /* NOTE: only some iterators set this, don't rely on it. */ char itype; } BMIter; diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index 40eed6238ca..1febae54b39 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -397,7 +397,7 @@ static BMLogEntry *bm_log_entry_create(void) /* Free the data in a log entry * - * Note: does not free the log entry itself */ + * NOTE: does not free the log entry itself. */ static void bm_log_entry_free(BMLogEntry *entry) { BLI_ghash_free(entry->deleted_verts, NULL, NULL); diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 190698f504c..b70e26f51ea 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -1386,7 +1386,7 @@ void BM_mesh_elem_hflag_enable_test(BMesh *bm, BLI_assert((htype & ~BM_ALL_NOLOOP) == 0); - /* note, better not attempt a fast path for selection as done with de-select + /* NOTE: better not attempt a fast path for selection as done with de-select * because hidden geometry and different selection modes can give different results, * we could of course check for no hidden faces and then use * quicker method but its not worth it. */ diff --git a/source/blender/bmesh/intern/bmesh_mesh_normals.c b/source/blender/bmesh/intern/bmesh_mesh_normals.c index 6ab7b8a2057..f429e77c656 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_normals.c +++ b/source/blender/bmesh/intern/bmesh_mesh_normals.c @@ -604,7 +604,7 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, * If we find a new, never-processed cyclic smooth fan, we can do it now using that loop/edge * as 'entry point', otherwise we can skip it. */ - /* Note: In theory, we could make bm_mesh_loop_check_cyclic_smooth_fan() store + /* NOTE: In theory, we could make bm_mesh_loop_check_cyclic_smooth_fan() store * mlfan_pivot's in a stack, to avoid having to fan again around * the vert during actual computation of clnor & clnorspace. However, this would complicate * the code, add more memory usage, and @@ -1281,7 +1281,7 @@ void BM_lnorspace_invalidate(BMesh *bm, const bool do_invalidate_all) BMVert *v; BMLoop *l; BMIter viter, liter; - /* Note: we could use temp tag of BMItem for that, + /* NOTE: we could use temp tag of BMItem for that, * but probably better not use it in such a low-level func? * --mont29 */ BLI_bitmap *done_verts = BLI_BITMAP_NEW(bm->totvert, __func__); diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index f75497f2f19..5fa12397a07 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -183,7 +183,7 @@ bool BM_disk_dissolve(BMesh *bm, BMVert *v) } /* collapse the vertex */ - /* note, the baseedge can be a boundary of manifold, use this as join_faces arg */ + /* NOTE: the baseedge can be a boundary of manifold, use this as join_faces arg. */ e = BM_vert_collapse_faces( bm, baseedge, v, 1.0, true, !BM_edge_is_boundary(baseedge), true, true); @@ -873,7 +873,7 @@ bool BM_edge_rotate_check(BMEdge *e) */ bool BM_edge_rotate_check_degenerate(BMEdge *e, BMLoop *l1, BMLoop *l2) { - /* note: for these vars 'old' just means initial edge state. */ + /* NOTE: for these vars 'old' just means initial edge state. */ float ed_dir_old[3]; /* edge vector */ float ed_dir_new[3]; /* edge vector */ @@ -1054,7 +1054,7 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const bool ccw, const short check_f return NULL; } - /* note, this assumes joining the faces _didnt_ also remove the verts. + /* NOTE: this assumes joining the faces _didnt_ also remove the verts. * the #BM_edge_rotate_check will ensure this, but its possibly corrupt state or future edits * break this */ if ((l1 = BM_face_vert_share_loop(f, v1)) && (l2 = BM_face_vert_share_loop(f, v2)) && diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index a5cce41eee4..9466be4a300 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -567,7 +567,7 @@ static BMOpDefine bmo_contextual_create_def = { }, /* slots_out */ {{"faces.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}}, /* newly-made face(s) */ - /* note, this is for stand-alone edges only, not edges which are a part of newly created faces */ + /* NOTE: this is for stand-alone edges only, not edges which are a part of newly created faces. */ {"edges.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}}, /* newly-made edge(s) */ {{'\0'}}, }, diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index d09c0ee428d..767c455e5e9 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -537,7 +537,7 @@ void BMO_slot_buffer_hflag_disable(BMesh *bm, const bool do_flush); /* puts every element of type 'type' (which is a bitmask) with header - * flag 'flag', into a slot. note: ignores hidden elements + * flag 'flag', into a slot. NOTE: ignores hidden elements * (e.g. elements with header flag BM_ELEM_HIDDEN set). */ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, @@ -547,7 +547,7 @@ void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, const char hflag); /* puts every element of type 'type' (which is a bitmask) without - * header flag 'flag', into a slot. note: ignores hidden elements + * header flag 'flag', into a slot. NOTE: ignores hidden elements * (e.g. elements with header flag BM_ELEM_HIDDEN set). */ void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 303b5336a5c..37b1c9386e5 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -829,7 +829,7 @@ void BMO_slot_buffer_from_all(BMesh *bm, BMO_slot_buffer_alloc(op, slot_args, slot_name, totelement); - /* TODO - collapse these loops into one */ + /* TODO: collapse these loops into one. */ if (htype & BM_VERT) { BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) { @@ -890,7 +890,7 @@ static void bmo_slot_buffer_from_hflag(BMesh *bm, BMO_slot_buffer_alloc(op, slot_args, slot_name, totelement); - /* TODO - collapse these loops into one */ + /* TODO: collapse these loops into one. */ if (htype & BM_VERT) { BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) { @@ -1061,7 +1061,7 @@ static void bmo_slot_buffer_from_flag(BMesh *bm, ele_array = (BMHeader **)slot->data.buf; - /* TODO - collapse these loops into one */ + /* TODO: collapse these loops into one. */ if (htype & BM_VERT) { BM_ITER_MESH (ele, &iter, bm, BM_VERTS_OF_MESH) { @@ -1953,7 +1953,7 @@ bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, return true; error: - /* non urgent todo - explain exactly what is failing */ + /* TODO: explain exactly what is failing (not urgent). */ fprintf(stderr, "%s: error parsing formatting string\n", __func__); fprintf(stderr, "string: '%s', position %d\n", _fmt, (int)(fmt - ofmt)); diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 5397098a7f3..0aab10e7b1a 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -1296,7 +1296,7 @@ void BM_face_triangulate(BMesh *bm, r_edges_new[ne_i++] = e; } } - /* note, never disable tag's */ + /* NOTE: never disable tag's. */ } while ((l_iter = l_iter->next) != l_first); } diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c index 0754564fa47..99e50b35d97 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c @@ -49,7 +49,7 @@ * * \{ */ -/* Note: All these flags _must_ be cleared on exit */ +/* NOTE: All these flags _must_ be cleared on exit. */ /* face is a part of the edge-net (including the original face we're splitting) */ #define FACE_NET _FLAG_WALK @@ -519,7 +519,7 @@ bool BM_face_split_edgenet(BMesh *bm, } while ((l_iter = l_iter->next) != l_first); #endif - /* Note: 'VERT_IN_QUEUE' is often not needed at all, + /* NOTE: 'VERT_IN_QUEUE' is often not needed at all, * however in rare cases verts are added multiple times to the queue, * that on its own is harmless but in _very_ rare cases, * the queue will overflow its maximum size, @@ -1299,7 +1299,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm, BMVert *v_delimit = (&edge_arr[i]->v1)[j]; BMVert *v_other; - /* note, remapping will _never_ map a vertex to an already mapped vertex */ + /* NOTE: remapping will _never_ map a vertex to an already mapped vertex. */ while (UNLIKELY((v_other = bm_face_split_edgenet_partial_connect(bm, v_delimit, f)))) { struct TempVertPair *tvp = BLI_memarena_alloc(mem_arena, sizeof(*tvp)); tvp->next = temp_vert_pairs.list; diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c index 8047b52b625..bc881040e4e 100644 --- a/source/blender/bmesh/intern/bmesh_query.c +++ b/source/blender/bmesh/intern/bmesh_query.c @@ -1544,12 +1544,12 @@ float BM_loop_calc_face_angle(const BMLoop *l) */ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq, float r_normal[3]) { - /* Note: we cannot use result of normal_tri_v3 here to detect colinear vectors + /* NOTE: we cannot use result of normal_tri_v3 here to detect colinear vectors * (vertex on a straight line) from zero value, * because it does not normalize both vectors before making cross-product. * Instead of adding two costly normalize computations, * just check ourselves for colinear case. */ - /* Note: FEPSILON might need some finer tweaking at some point? + /* NOTE: FEPSILON might need some finer tweaking at some point? * Seems to be working OK for now though. */ float v1[3], v2[3], v_tmp[3]; sub_v3_v3v3(v1, l->prev->v->co, l->v->co); @@ -1807,7 +1807,7 @@ void BM_edge_calc_face_tangent(const BMEdge *e, const BMLoop *e_loop, float r_ta BM_edge_ordered_verts_ex(e, &v1, &v2, e_loop); sub_v3_v3v3(tvec, v1->co, v2->co); /* use for temp storage */ - /* note, we could average the tangents of both loops, + /* NOTE: we could average the tangents of both loops, * for non flat ngons it will give a better direction */ cross_v3_v3v3(r_tangent, tvec, e_loop->f->no); normalize_v3(r_tangent); @@ -2591,7 +2591,7 @@ double BM_mesh_calc_volume(BMesh *bm, bool is_signed) return vol; } -/* note, almost duplicate of BM_mesh_calc_edge_groups, keep in sync */ +/* NOTE: almost duplicate of #BM_mesh_calc_edge_groups, keep in sync. */ /** * Calculate isolated groups of faces with optional filtering. * @@ -2753,7 +2753,7 @@ int BM_mesh_calc_face_groups(BMesh *bm, return group_curr; } -/* note, almost duplicate of BM_mesh_calc_face_groups, keep in sync */ +/* NOTE: almost duplicate of #BM_mesh_calc_face_groups, keep in sync. */ /** * Calculate isolated groups of edges with optional filtering. * diff --git a/source/blender/bmesh/intern/bmesh_structure.h b/source/blender/bmesh/intern/bmesh_structure.h index b3b9536618c..ca51a9c39de 100644 --- a/source/blender/bmesh/intern/bmesh_structure.h +++ b/source/blender/bmesh/intern/bmesh_structure.h @@ -63,7 +63,7 @@ BMEdge *bmesh_disk_faceedge_find_next(const BMEdge *e, const BMVert *v) ATTR_WAR void bmesh_radial_loop_append(BMEdge *e, BMLoop *l) ATTR_NONNULL(); void bmesh_radial_loop_remove(BMEdge *e, BMLoop *l) ATTR_NONNULL(); void bmesh_radial_loop_unlink(BMLoop *l) ATTR_NONNULL(); -/* note: +/* NOTE: * bmesh_radial_loop_next(BMLoop *l) / prev. * just use member access l->radial_next, l->radial_prev now */ diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c index b57c8686e1c..660633e8a0f 100644 --- a/source/blender/bmesh/operators/bmo_connect_pair.c +++ b/source/blender/bmesh/operators/bmo_connect_pair.c @@ -571,7 +571,7 @@ static void bm_vert_pair_to_matrix(BMVert *v_pair[2], float r_unit_mat[3][3]) } /* create a new 'basis_nor' from the best direction. - * note: we could add the directions, + * NOTE: we could add the directions, * but this more often gives 45d rotated matrix, so just use the best one. */ copy_v3_v3(basis_nor, axis_pair[axis_pair[0].angle_cos < axis_pair[1].angle_cos].nor); project_plane_normalized_v3_v3v3(basis_nor, basis_nor, basis_dir); diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index f38e2e08f33..2e2a7e0964e 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -184,7 +184,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) /* -------------------------------------------------------------------- */ /* Dissolve Face */ if (totf != 0) { /* should be (totf > 1)... see below */ - /* note: allow this to run on single faces so running on a single face + /* NOTE: allow this to run on single faces so running on a single face * won't go on to create a face, treating them as random */ BMOperator op_sub; BMO_op_initf(bm, &op_sub, op->flag, "dissolve_faces faces=%ff", ELE_NEW); @@ -204,7 +204,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) /* Fill EdgeLoop's - fills isolated loops, different from edgenet */ if (tote > 2) { BMOperator op_sub; - /* note: in most cases 'edgenet_fill' will handle this case since in common cases + /* NOTE: in most cases 'edgenet_fill' will handle this case since in common cases * users fill in empty spaces, however its possible to have an edge selection around * existing geometry that makes 'edgenet_fill' fail. */ BMO_op_initf(bm, &op_sub, op->flag, "edgeloop_fill edges=%fe", ELE_NEW); @@ -280,7 +280,7 @@ void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) * last resort when all else fails. */ if (totv > 2) { - /* TODO, some of these vertices may be connected by edges, + /* TODO: some of these vertices may be connected by edges, * this connectivity could be used rather than treating * them as a bunch of isolated verts. */ diff --git a/source/blender/bmesh/operators/bmo_edgenet.c b/source/blender/bmesh/operators/bmo_edgenet.c index 53a2a3b2bba..5449762b83c 100644 --- a/source/blender/bmesh/operators/bmo_edgenet.c +++ b/source/blender/bmesh/operators/bmo_edgenet.c @@ -52,7 +52,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false); BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false); - BM_mesh_edgenet(bm, true, true); /* TODO, sides */ + BM_mesh_edgenet(bm, true, true); /* TODO: sides. */ BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG); diff --git a/source/blender/bmesh/operators/bmo_fill_edgeloop.c b/source/blender/bmesh/operators/bmo_fill_edgeloop.c index 16f9922b21d..2b481542463 100644 --- a/source/blender/bmesh/operators/bmo_fill_edgeloop.c +++ b/source/blender/bmesh/operators/bmo_fill_edgeloop.c @@ -85,7 +85,7 @@ void bmo_edgeloop_fill_exec(BMesh *bm, BMOperator *op) } if (ok) { - /* note: in the case of multiple loops, this over-allocs (which is fine) */ + /* NOTE: in the case of multiple loops, this over-allocs (which is fine). */ BMVert **f_verts = MEM_mallocN(sizeof(*verts) * totv, __func__); BMIter eiter; diff --git a/source/blender/bmesh/operators/bmo_fill_holes.c b/source/blender/bmesh/operators/bmo_fill_holes.c index 5801db582e1..64107fefe73 100644 --- a/source/blender/bmesh/operators/bmo_fill_holes.c +++ b/source/blender/bmesh/operators/bmo_fill_holes.c @@ -35,7 +35,7 @@ void bmo_holes_fill_exec(BMesh *bm, BMOperator *op) BM_mesh_elem_hflag_disable_all(bm, BM_EDGE | BM_FACE, BM_ELEM_TAG, false); BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false); - BM_mesh_edgenet(bm, true, true); // TODO, sides + BM_mesh_edgenet(bm, true, true); // TODO: sides /* bad - remove faces after as a workaround */ if (sides != 0) { diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c index 956d55695d6..dd2fe52293f 100644 --- a/source/blender/bmesh/operators/bmo_hull.c +++ b/source/blender/bmesh/operators/bmo_hull.c @@ -278,7 +278,7 @@ static void hull_remove_overlapping(BMesh *bm, } } - /* Note: can't change ghash while iterating, so mark + /* NOTE: can't change ghash while iterating, so mark * with 'skip' flag rather than deleting triangles */ if (BM_vert_in_face(t->v[1], f) && BM_vert_in_face(t->v[2], f) && f_on_hull) { t->skip = true; @@ -505,7 +505,7 @@ static void hull_from_bullet(BMesh *bm, BMOperator *op, BLI_mempool *hull_triang BLI_array_grow_items(fvi, len); plConvexHullGetFaceVertices(hull, i, fvi); - /* Note: here we throw away any NGons from Bullet and turn + /* NOTE: here we throw away any NGons from Bullet and turn * them into triangle fans. Would be nice to use these * directly, but will have to wait until HullTriangle goes * away (TODO) */ diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 3f6619cc2ee..4833290aa0b 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -822,7 +822,7 @@ void bmo_inset_region_exec(BMesh *bm, BMOperator *op) /* this could go in its own loop, * only use the 'es->l->f' so we don't store loops for faces which have no mixed selection * - * note: faces on the other side of the inset will be interpolated too since this is hard to + * NOTE: faces on the other side of the inset will be interpolated too since this is hard to * detect, just allow it even though it will cause some redundant interpolation */ if (use_interpolate) { BMIter viter; diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c index c3e96a9b08e..8b456bb0925 100644 --- a/source/blender/bmesh/operators/bmo_join_triangles.c +++ b/source/blender/bmesh/operators/bmo_join_triangles.c @@ -44,7 +44,7 @@ static float quad_calc_error(const float v1[3], { /* Gives a 'weight' to a pair of triangles that join an edge * to decide how good a join they would make. */ - /* Note: this is more complicated than it needs to be and should be cleaned up. */ + /* NOTE: this is more complicated than it needs to be and should be cleaned up. */ float error = 0.0f; /* Normal difference */ diff --git a/source/blender/bmesh/operators/bmo_offset_edgeloops.c b/source/blender/bmesh/operators/bmo_offset_edgeloops.c index 2c7e478b549..98a8432cfb1 100644 --- a/source/blender/bmesh/operators/bmo_offset_edgeloops.c +++ b/source/blender/bmesh/operators/bmo_offset_edgeloops.c @@ -221,7 +221,7 @@ void bmo_offset_edgeloops_exec(BMesh *bm, BMOperator *op) } } - /* Note: instead of duplicate code in alternate direction, + /* NOTE: instead of duplicate code in alternate direction, * we can be sure to hit the other vertex, so the code above runs. */ #if 0 else if (BM_elem_index_get(l->prev->v) == -1) { diff --git a/source/blender/bmesh/operators/bmo_rotate_edges.c b/source/blender/bmesh/operators/bmo_rotate_edges.c index b684aa390cf..f05f6489c99 100644 --- a/source/blender/bmesh/operators/bmo_rotate_edges.c +++ b/source/blender/bmesh/operators/bmo_rotate_edges.c @@ -191,7 +191,7 @@ static void bm_rotate_edges_shared( edges_len_rotate += 1; - /* Note: we could validate all edges which have not been rotated + /* NOTE: we could validate all edges which have not been rotated * (not just previously degenerate edges). * However there is no real need - * they can be left until they're popped off the queue. */ diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index ae4fa65b55c..7311c94a0d8 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -79,7 +79,7 @@ typedef void (*subd_pattern_fill_fp)(BMesh *bm, const SubDParams *params); /* - * note: this is a pattern-based edge subdivider. + * NOTE: this is a pattern-based edge subdivider. * it tries to match a pattern to edge selections on faces, * then executes functions to cut them. */ @@ -138,7 +138,7 @@ static BMEdge *connect_smallest_face(BMesh *bm, BMVert *v_a, BMVert *v_b, BMFace * multiple faces yet. that might require a convexity test to figure out which * face is "best" and who knows what for non-manifold conditions. * - * note: we allow adjacent here, since there's no chance this happens. + * NOTE: we allow adjacent here, since there's no chance this happens. */ f = BM_vert_pair_share_face_by_len(v_a, v_b, &l_a, &l_b, true); @@ -469,7 +469,7 @@ static void bm_subdivide_multicut( alter_co(v2, &e_tmp, params, 1.0, &v1_tmp, &v2_tmp); } -/* note: the patterns are rotated as necessary to +/* NOTE: the patterns are rotated as necessary to * match the input geometry. they're based on the * pre-split state of the face */ diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c index d9bfe96ddc4..caca24f4409 100644 --- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c +++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c @@ -83,8 +83,8 @@ static float bezier_handle_calc_length_v3(const float co_a[3], float fac = 1.333333f; float len; if (dot < 0.0f) { - /* scale down to 0.666 if we point directly at each other rough but ok */ - /* TODO, current blend from dot may not be optimal but its also a detail */ + /* Scale down to 0.666 if we point directly at each other rough but ok. */ + /* TODO: current blend from dot may not be optimal but its also a detail. */ const float t = 1.0f + dot; fac = (fac * t) + (0.75f * (1.0f - t)); } @@ -821,7 +821,7 @@ static void bm_edgering_pair_interpolate(BMesh *bm, */ static void bm_face_slice(BMesh *bm, BMLoop *l, const int cuts) { - /* TODO, interpolate edge data */ + /* TODO: interpolate edge data. */ BMLoop *l_new = l; int i; diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c index 4ef165fe6c1..d5c5063f2cb 100644 --- a/source/blender/bmesh/tools/bmesh_beautify.c +++ b/source/blender/bmesh/tools/bmesh_beautify.c @@ -429,7 +429,7 @@ void BM_mesh_beautify_fill(BMesh *bm, GSet *e_state_set = edge_state_arr[i]; /* add the new state into the set so we don't move into this state again - * note: we could add the previous state too but this isn't essential) + * NOTE: we could add the previous state too but this isn't essential) * for avoiding eternal loops */ EdRotState *e_state = BLI_mempool_alloc(edge_state_pool); erot_state_current(e, e_state); diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 65cceb8dcfd..28d0aecbb3d 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -321,7 +321,7 @@ typedef struct BevelParams { GHash *vert_hash; /** Records new faces: key BMFace*, value one of {VERT/EDGE/RECON}_POLY. */ GHash *face_hash; - /** Use for all allocs while bevel runs. Note: If we need to free we can switch to mempool. */ + /** Use for all allocs while bevel runs. NOTE: If we need to free we can switch to mempool. */ MemArena *mem_arena; /** Profile vertex location and spacings. */ ProfileSpacing pro_spacing; @@ -1225,7 +1225,7 @@ static void offset_meet_lines_percent_or_absolute(BevelParams *bp, float r_l2b[3]) { /* Get points the specified distance along each leg. - * Note: not all BevVerts and EdgeHalfs have been made yet, so we have + * NOTE: not all BevVerts and EdgeHalfs have been made yet, so we have * to find required edges by moving around faces and use fake EdgeHalfs for * some of the edges. If there aren't faces to move around, we have to give up. * The legs we need are: @@ -3621,7 +3621,7 @@ static void adjust_the_cycle_or_chain(BoundVert *vstart, bool iscycle) } while (v && v != vstart); EIG_linear_solver_solve(solver); #ifdef DEBUG_ADJUST - /* Note: this print only works after solve, but by that time b has been cleared. */ + /* NOTE: this print only works after solve, but by that time b has been cleared. */ EIG_linear_solver_print_matrix(solver); printf("\nSolution:\n"); for (i = 0; i < np; i++) { @@ -3682,7 +3682,7 @@ static void adjust_the_cycle_or_chain(BoundVert *vstart, bool iscycle) static void adjust_offsets(BevelParams *bp, BMesh *bm) { /* Find and process chains and cycles of unvisited BoundVerts that have eon set. */ - /* Note: for repeatability, iterate over all verts of mesh rather than over ghash'ed BMVerts. */ + /* NOTE: for repeatability, iterate over all verts of mesh rather than over ghash'ed BMVerts. */ BMIter iter; BMVert *bmv; BM_ITER_MESH (bmv, &iter, bm, BM_VERTS_OF_MESH) { @@ -6194,7 +6194,7 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v) weight = BM_elem_float_data_get(&bm->vdata, v, CD_BWEIGHT); bv->offset *= weight; } - /* Find center axis. Note: Don't use vert normal, can give unwanted results. */ + /* Find center axis. NOTE: Don't use vert normal, can give unwanted results. */ if (ELEM(bp->offset_type, BEVEL_AMT_WIDTH, BEVEL_AMT_DEPTH)) { float edge_dir[3]; EdgeHalf *e = bv->edges; @@ -6872,7 +6872,7 @@ static double find_superellipse_chord_endpoint(double x0, double dtarget, float double ymin = superellipse_co(xmin, r, rbig); double ymax = superellipse_co(xmax, r, rbig); - /* Note: using distance**2 (no sqrt needed) does not converge that well. */ + /* NOTE: using distance**2 (no sqrt needed) does not converge that well. */ double dmaxerr = sqrt(pow((xmax - x0), 2) + pow((ymax - y0), 2)) - dtarget; double dminerr = sqrt(pow((xmin - x0), 2) + pow((ymin - y0), 2)) - dtarget; @@ -7253,7 +7253,7 @@ static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb) return no_collide_offset; } float kb = eb->offset_l_spec; - EdgeHalf *ea = eb->next; /* Note: this is in direction b --> a. */ + EdgeHalf *ea = eb->next; /* NOTE: this is in direction b --> a. */ float ka = ea->offset_r_spec; BMVert *vb, *vc; if (eb->is_rev) { @@ -7282,7 +7282,7 @@ static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb) return no_collide_offset; } if (ebother != NULL) { - ec = ebother->prev; /* Note: this is in direction c --> d. */ + ec = ebother->prev; /* NOTE: this is in direction c --> d. */ vc = bvc->v; kc = ec->offset_l_spec; vd = ec->is_rev ? ec->e->v1 : ec->e->v2; diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index a1630d9d2ff..20b6903b239 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -285,7 +285,7 @@ static void bm_decim_build_edge_cost_single(BMEdge *e, cost = (BLI_quadric_evaluate(q1, optimize_co) + BLI_quadric_evaluate(q2, optimize_co)); } - /* note, 'cost' shouldn't be negative but happens sometimes with small values. + /* NOTE: 'cost' shouldn't be negative but happens sometimes with small values. * this can cause faces that make up a flat surface to over-collapse, see T37121. */ cost = fabsf(cost); @@ -303,7 +303,7 @@ static void bm_decim_build_edge_cost_single(BMEdge *e, const float e_weight = (vweights[BM_elem_index_get(e->v1)] + vweights[BM_elem_index_get(e->v2)]); cost = bm_decim_build_edge_cost_single__topology(e) - cost; - /* note, this is rather arbitrary max weight is 2 here, + /* NOTE: this is rather arbitrary max weight is 2 here, * allow for skipping edges 4x the length, based on weights */ if (e_weight) { cost *= 1.0f + (e_weight * vweight_factor); diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c index 036dae1b9bd..d8a586acee5 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c +++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c @@ -55,7 +55,7 @@ static float bm_vert_edge_face_angle(BMVert *v, #define ANGLE_TO_UNIT (1.0f / UNIT_TO_ANGLE) const float angle = BM_vert_calc_edge_angle(v); - /* note: could be either edge, it doesn't matter */ + /* NOTE: could be either edge, it doesn't matter. */ if (v->e && BM_edge_is_manifold(v->e)) { /* Checking delimited is important here, * otherwise the boundary between two materials for e.g. diff --git a/source/blender/bmesh/tools/bmesh_path.c b/source/blender/bmesh/tools/bmesh_path.c index cb75f47acf3..ea1e7eb1e43 100644 --- a/source/blender/bmesh/tools/bmesh_path.c +++ b/source/blender/bmesh/tools/bmesh_path.c @@ -142,7 +142,7 @@ LinkNode *BM_mesh_calc_path_vert(BMesh *bm, BMVert **verts_prev; int i, totvert; - /* Note, would pass #BM_EDGE except we are looping over all faces anyway. */ + /* NOTE: would pass #BM_EDGE except we are looping over all faces anyway. */ // BM_mesh_elem_index_ensure(bm, BM_VERT /* | BM_EDGE */); // NOT NEEDED FOR FACETAG BM_ITER_MESH_INDEX (v, &viter, bm, BM_VERTS_OF_MESH, i) { @@ -322,7 +322,7 @@ LinkNode *BM_mesh_calc_path_edge(BMesh *bm, BMEdge **edges_prev; int i, totedge; - /* Note, would pass #BM_EDGE except we are looping over all edges anyway. */ + /* NOTE: would pass #BM_EDGE except we are looping over all edges anyway. */ BM_mesh_elem_index_ensure(bm, BM_VERT /* | BM_EDGE */); BM_ITER_MESH_INDEX (e, &eiter, bm, BM_EDGES_OF_MESH, i) { @@ -523,7 +523,7 @@ LinkNode *BM_mesh_calc_path_face(BMesh *bm, /* Start measuring face path at the face edges, ignoring their centers. */ const void *const f_endpoints[2] = {f_src, f_dst}; - /* Note, would pass #BM_EDGE except we are looping over all faces anyway. */ + /* NOTE: would pass #BM_EDGE except we are looping over all faces anyway. */ // BM_mesh_elem_index_ensure(bm, BM_VERT /* | BM_EDGE */); // NOT NEEDED FOR FACETAG BM_ITER_MESH_INDEX (f, &fiter, bm, BM_FACES_OF_MESH, i) { diff --git a/source/blender/bmesh/tools/bmesh_path_uv.c b/source/blender/bmesh/tools/bmesh_path_uv.c index 57a70645187..30b109d4731 100644 --- a/source/blender/bmesh/tools/bmesh_path_uv.c +++ b/source/blender/bmesh/tools/bmesh_path_uv.c @@ -139,7 +139,7 @@ struct LinkNode *BM_mesh_calc_path_uv_vert(BMesh *bm, int i = 0, totloop; BMFace *f; - /* Note, would pass BM_EDGE except we are looping over all faces anyway. */ + /* NOTE: would pass BM_EDGE except we are looping over all faces anyway. */ // BM_mesh_elem_index_ensure(bm, BM_LOOP); // NOT NEEDED FOR FACETAG BM_ITER_MESH (f, &viter, bm, BM_FACES_OF_MESH) { @@ -377,7 +377,7 @@ struct LinkNode *BM_mesh_calc_path_uv_face(BMesh *bm, /* Start measuring face path at the face edges, ignoring their centers. */ const void *const f_endpoints[2] = {f_src, f_dst}; - /* Note, would pass BM_EDGE except we are looping over all faces anyway. */ + /* NOTE: would pass BM_EDGE except we are looping over all faces anyway. */ // BM_mesh_elem_index_ensure(bm, BM_LOOP); // NOT NEEDED FOR FACETAG { diff --git a/source/blender/bmesh/tools/bmesh_region_match.c b/source/blender/bmesh/tools/bmesh_region_match.c index c538d5b17cd..4ae5bfb7fb2 100644 --- a/source/blender/bmesh/tools/bmesh_region_match.c +++ b/source/blender/bmesh/tools/bmesh_region_match.c @@ -1053,7 +1053,7 @@ static BMEdge *bm_face_region_pivot_edge_find(BMFace **faces_region, uint verts_region_len, uint *r_depth) { - /* note, keep deterministic where possible (geometry order independent) + /* NOTE: keep deterministic where possible (geometry order independent) * this function assumed all visit faces & edges are tagged */ BLI_LINKSTACK_DECLARE(vert_queue_prev, BMVert *); diff --git a/source/blender/bmesh/tools/bmesh_wireframe.c b/source/blender/bmesh/tools/bmesh_wireframe.c index de2deee2929..af4a4424103 100644 --- a/source/blender/bmesh/tools/bmesh_wireframe.c +++ b/source/blender/bmesh/tools/bmesh_wireframe.c @@ -77,7 +77,7 @@ static void bm_vert_boundary_tangent( } if (e_a && e_b) { - /* note, with an incorrectly flushed selection this can crash */ + /* NOTE: with an incorrectly flushed selection this can crash. */ l_a = bm_edge_tag_faceloop(e_a); l_b = bm_edge_tag_faceloop(e_b); |