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/tools | |
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/tools')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_beautify.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 16 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_decimate_collapse.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_decimate_dissolve.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_path.c | 6 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_path_uv.c | 4 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_region_match.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_wireframe.c | 2 |
8 files changed, 19 insertions, 19 deletions
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); |