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/editors/mesh | |
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/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_bisect.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_rip.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_select_similar.c | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 16 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_mirror.c | 5 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 4 |
13 files changed, 31 insertions, 30 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index b7ee50a9461..648008a4779 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -65,7 +65,7 @@ void paintface_flush_flags(struct bContext *C, Object *ob, short flag) return; } - /* note, call #BKE_mesh_flush_hidden_from_verts_ex first when changing hidden flags */ + /* NOTE: call #BKE_mesh_flush_hidden_from_verts_ex first when changing hidden flags. */ /* we could call this directly in all areas that change selection, * since this could become slow for realtime updates (circle-select for eg) */ @@ -433,7 +433,7 @@ bool paintface_mouse_select( /* image window redraw */ paintface_flush_flags(C, ob, SELECT); - ED_region_tag_redraw(CTX_wm_region(C)); /* XXX - should redraw all 3D views */ + ED_region_tag_redraw(CTX_wm_region(C)); /* XXX: should redraw all 3D views. */ return true; } diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index 110f1975d8d..0388e133534 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -279,7 +279,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal) for (int i = 0; i < NUM_VALUE_KINDS; i++) { opdata->shift_value[i] = -1.0f; opdata->initial_length[i] = -1.0f; - /* note: scale for OFFSET_VALUE will get overwritten in edbm_bevel_invoke */ + /* NOTE: scale for #OFFSET_VALUE will get overwritten in #edbm_bevel_invoke. */ opdata->scale[i] = value_scale_per_inch[i] / pixels_per_inch; initNumInput(&opdata->num_input[i]); diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index 42cf36dda81..8afbc61272f 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -280,7 +280,7 @@ static int mesh_bisect_exec(bContext *C, wmOperator *op) /* -------------------------------------------------------------------- */ /* Modal support */ - /* Note: keep this isolated, exec can work without this */ + /* NOTE: keep this isolated, exec can work without this. */ if (opdata != NULL) { mesh_bisect_interactive_calc(C, op, plane_co, plane_no); /* Write back to the props. */ diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 0e2dd492e06..73f6a3f3238 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -157,7 +157,7 @@ typedef struct KnifePosData { typedef struct KnifeTool_OpData { ARegion *region; /* region that knifetool was activated in */ void *draw_handle; /* for drawing preview loop */ - ViewContext vc; /* note: _don't_ use 'mval', instead use the one we define below */ + ViewContext vc; /* NOTE: _don't_ use 'mval', instead use the one we define below. */ float mval[2]; /* mouse value with snapping applied */ // bContext *C; @@ -1475,7 +1475,7 @@ static void knife_add_cut(KnifeTool_OpData *kcd) } } - /* Note: as following loop progresses, the 'v' fields of + /* NOTE: as following loop progresses, the 'v' fields of * the linehits will be filled in (as edges are split or * in-face verts are made), so it may be true that both * the v and the kfe or f fields will be non-NULL. */ @@ -1760,7 +1760,7 @@ static bool point_is_visible(KnifeTool_OpData *kcd, if (RV3D_CLIPPING_ENABLED(kcd->vc.v3d, kcd->vc.rv3d)) { float view_clip[2][3]; - /* note: view_clip[0] should never get clipped */ + /* NOTE: view_clip[0] should never get clipped. */ copy_v3_v3(view_clip[0], p_ofs); madd_v3_v3v3fl(view_clip[1], p_ofs, view, dist); diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index 71319338a53..0a4fecde6ea 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -241,7 +241,7 @@ static void ringsel_finish(bContext *C, wmOperator *op) * in editmesh_select.c (around line 1000)... */ /* sets as active, useful for other tools */ if (em->selectmode & SCE_SELECT_VERTEX) { - /* low priority TODO, get vertrex close to mouse */ + /* low priority TODO: get vertrex close to mouse. */ BM_select_history_store(em->bm, lcd->eed->v1); } if (em->selectmode & SCE_SELECT_EDGE) { diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c index 8626520ec37..5a2a090b725 100644 --- a/source/blender/editors/mesh/editmesh_rip.c +++ b/source/blender/editors/mesh/editmesh_rip.c @@ -927,7 +927,7 @@ static int edbm_rip_invoke__edge(bContext *C, const wmEvent *event, Object *obed /* single edge, extend */ if (i == 1 && e_best->l) { - /* note: if the case of 3 edges has one change in loop stepping, + /* NOTE: if the case of 3 edges has one change in loop stepping, * if this becomes more involved we may be better off splitting * the 3 edge case into its own else-if branch */ if ((totedge_manifold == 4 || totedge_manifold == 3) || (all_manifold == false)) { @@ -975,7 +975,7 @@ static int edbm_rip_invoke__edge(bContext *C, const wmEvent *event, Object *obed BM_mesh_edgesplit(em->bm, true, true, true); - /* note: the output of the bmesh operator is ignored, since we built + /* NOTE: the output of the bmesh operator is ignored, since we built * the contiguous loop pairs to split already, its possible that some * edge did not split even though it was tagged which would not work * as expected (but not crash), however there are checks to ensure diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 49fd2a441f0..6753c235a8d 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -434,7 +434,7 @@ struct NearestEdgeUserData { struct NearestEdgeUserData_Hit hit_cycle; }; -/* note; uses v3d, so needs active 3d window */ +/* NOTE: uses v3d, so needs active 3d window. */ static void find_nearest_edge__doClosest( void *userData, BMEdge *eed, const float screen_co_a[2], const float screen_co_b[2], int index) { @@ -3446,7 +3446,7 @@ static void edbm_select_linked_pick_ex(BMEditMesh *em, BMElem *ele, bool sel, in select_linked_delimit_begin(bm, delimit); } - /* Note: logic closely matches 'edbm_select_linked_exec', keep in sync */ + /* NOTE: logic closely matches #edbm_select_linked_exec, keep in sync. */ if (ele->head.htype == BM_VERT) { BMVert *eve = (BMVert *)ele; diff --git a/source/blender/editors/mesh/editmesh_select_similar.c b/source/blender/editors/mesh/editmesh_select_similar.c index 2ffeaa06751..ff4db96061f 100644 --- a/source/blender/editors/mesh/editmesh_select_similar.c +++ b/source/blender/editors/mesh/editmesh_select_similar.c @@ -559,7 +559,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) * \{ */ /** - * Note: This is not normal, but the edge direction itself and always in + * NOTE: This is not normal, but the edge direction itself and always in * a positive quadrant (tries z, y then x). * Therefore we need to use the entire object transformation matrix. */ diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fe9656d277e..e1f192bea77 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -145,7 +145,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -/* Note, these values must match delete_mesh() event values */ +/* NOTE: these values must match delete_mesh() event values. */ static const EnumPropertyItem prop_mesh_cornervert_types[] = { {SUBD_CORNER_INNERVERT, "INNERVERT", 0, "Inner Vert", ""}, {SUBD_CORNER_PATH, "PATH", 0, "Path", ""}, @@ -245,7 +245,7 @@ static void mesh_operator_edgering_props(wmOperatorType *ot, const int cuts_min, const int cuts_default) { - /* Note, these values must match delete_mesh() event values */ + /* NOTE: these values must match delete_mesh() event values. */ static const EnumPropertyItem prop_subd_edgering_types[] = { {SUBD_RING_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, {SUBD_RING_INTERP_PATH, "PATH", 0, "Blend Path", ""}, @@ -431,7 +431,7 @@ void MESH_OT_unsubdivide(wmOperatorType *ot) /** \name Delete Operator * \{ */ -/* Note, these values must match delete_mesh() event values */ +/* NOTE: these values must match delete_mesh() event values. */ enum { MESH_DELETE_VERT = 0, MESH_DELETE_EDGE = 1, @@ -4222,7 +4222,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) /* for ED_view3d_project_float_object */ ED_view3d_init_mats_rv3d(obedit, region->regiondata); - /* TODO, investigate using index lookup for screen_vert_coords() rather than a hash table */ + /* TODO: investigate using index lookup for #screen_vert_coords() rather than a hash table. */ /* the floating point coordinates of verts in screen space will be * stored in a hash table according to the vertices pointer */ @@ -5874,7 +5874,7 @@ void MESH_OT_decimate(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - /* Note, keep in sync with 'rna_def_modifier_decimate' */ + /* NOTE: keep in sync with 'rna_def_modifier_decimate'. */ RNA_def_float(ot->srna, "ratio", 1.0f, 0.0f, 1.0f, "Ratio", "", 0.0f, 1.0f); RNA_def_boolean(ot->srna, @@ -6751,7 +6751,7 @@ static void sort_bmelem_flag(bContext *C, BM_ITER_MESH_INDEX (fa, &iter, em->bm, BM_FACES_OF_MESH, i) { if (BM_elem_flag_test(fa, flag)) { /* Reverse materials' order, not order of faces inside each mat! */ - /* Note: cannot use totcol, as mat_nr may sometimes be greater... */ + /* NOTE: cannot use totcol, as mat_nr may sometimes be greater... */ float srt = reverse ? (float)(MAXMAT - fa->mat_nr) : (float)fa->mat_nr; pb[i] = false; sb[affected[2]].org_idx = i; @@ -8385,7 +8385,7 @@ static void point_normals_update_header(bContext *C, wmOperator *op) ED_area_status_text(CTX_wm_area(C), header); } -/* TODO move that to generic function in BMesh? */ +/* TODO: move that to generic function in BMesh? */ static void bmesh_selected_verts_center_calc(BMesh *bm, float *r_center) { BMVert *v; @@ -9691,7 +9691,7 @@ static int edbm_smooth_normals_exec(bContext *C, wmOperator *op) BKE_lnor_space_custom_data_to_normal( bm->lnor_spacearr->lspacearr[lnor_ed->loop_index], lnor_ed->clnors_data, current_normal); - /* Note: again, this is not true spherical interpolation that normals would need... + /* NOTE: again, this is not true spherical interpolation that normals would need... * But it's probably good enough for now. */ mul_v3_fl(current_normal, 1.0f - factor); mul_v3_fl(smooth_normal[i], factor); diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 4beed6935d4..aa5cdafb05f 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -199,7 +199,7 @@ bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool edbm_op_emcopy_restore_and_clear(em, bmop); /** - * Note, we could pass in the mesh, however this is an exceptional case, allow a slow lookup. + * NOTE: we could pass in the mesh, however this is an exceptional case, allow a slow lookup. * * This is needed because the COW mesh makes a full copy of the #BMEditMesh * instead of sharing the pointer, tagging since this has been freed above, @@ -1489,7 +1489,7 @@ void EDBM_update(Mesh *mesh, const struct EDBMUpdate_Params *params) } if (params->is_destructive) { - /* TODO. we may be able to remove this now! - Campbell */ + /* TODO(campbell): we may be able to remove this now! */ // BM_mesh_elem_table_free(em->bm, BM_ALL_NOLOOP); } else { diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 7c6dc6516ed..2b78d83a9f5 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -252,7 +252,7 @@ void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); } -/* note: keep in sync with ED_mesh_color_add */ +/* NOTE: keep in sync with #ED_mesh_color_add. */ int ED_mesh_uv_texture_add(Mesh *me, const char *name, const bool active_set, const bool do_init) { BMEditMesh *em; @@ -377,7 +377,7 @@ bool ED_mesh_uv_texture_remove_named(Mesh *me, const char *name) return false; } -/* note: keep in sync with ED_mesh_uv_texture_add */ +/* NOTE: keep in sync with #ED_mesh_uv_texture_add. */ int ED_mesh_color_add(Mesh *me, const char *name, const bool active_set, const bool do_init) { BMEditMesh *em; @@ -483,7 +483,7 @@ bool ED_mesh_color_remove_named(Mesh *me, const char *name) /*********************** Sculpt Vertex colors operators ************************/ -/* note: keep in sync with ED_mesh_uv_texture_add */ +/* NOTE: keep in sync with #ED_mesh_uv_texture_add. */ int ED_mesh_sculpt_color_add(Mesh *me, const char *name, const bool active_set, const bool do_init) { BMEditMesh *em; diff --git a/source/blender/editors/mesh/mesh_mirror.c b/source/blender/editors/mesh/mesh_mirror.c index 25d3eaf11d4..5eb69aab48b 100644 --- a/source/blender/editors/mesh/mesh_mirror.c +++ b/source/blender/editors/mesh/mesh_mirror.c @@ -308,8 +308,9 @@ void ED_mesh_mirrtopo_init(BMEditMesh *em, last = 0; - /* Get the pairs out of the sorted hashes, note, totvert+1 means we can use the previous 2, - * but you can't ever access the last 'a' index of MirrTopoPairs */ + /* Get the pairs out of the sorted hashes. + * NOTE: `totvert + 1` means we can use the previous 2, + * but you can't ever access the last 'a' index of #MirrTopoPairs. */ if (em) { BMVert **vtable = em->bm->vtable; for (a = 1; a <= totvert; a++) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index f306612f295..ca68c47cf8e 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -390,7 +390,7 @@ int ED_mesh_join_objects_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* Apply parent transform if the active object's parent was joined to it. - * Note: This doesn't apply recursive parenting. */ + * NOTE: This doesn't apply recursive parenting. */ if (join_parent) { ob->parent = NULL; BKE_object_apply_mat4_ex(ob, ob->obmat, ob->parent, ob->parentinv, false); @@ -1060,7 +1060,7 @@ static float *editmesh_get_mirror_uv( cent_vec[1] = face_cent[1]; } - /* TODO - Optimize */ + /* TODO: Optimize. */ { BMIter iter; BMFace *efa; |