From 333cdbb41025db012239e0549a439515880aad9b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Apr 2019 07:21:26 +0200 Subject: Cleanup: comment blocks --- source/blender/editors/mesh/editmesh_tools.c | 29 ++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 79bbf021829..fcad933e3c4 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5904,19 +5904,28 @@ void MESH_OT_split(wmOperatorType *ot) * \{ */ enum { - SRT_VIEW_ZAXIS = 1, /* Use view Z (deep) axis. */ - SRT_VIEW_XAXIS, /* Use view X (left to right) axis. */ - SRT_CURSOR_DISTANCE, /* Use distance from element to 3D cursor. */ - SRT_MATERIAL, /* Face only: use mat number. */ - SRT_SELECTED, /* Move selected elements in first, without modifying - * relative order of selected and unselected elements. */ - SRT_RANDOMIZE, /* Randomize selected elements. */ - SRT_REVERSE, /* Reverse current order of selected elements. */ + /** Use view Z (deep) axis. */ + SRT_VIEW_ZAXIS = 1, + /** Use view X (left to right) axis. */ + SRT_VIEW_XAXIS, + /** Use distance from element to 3D cursor. */ + SRT_CURSOR_DISTANCE, + /** Face only: use mat number. */ + SRT_MATERIAL, + /** Move selected elements in first, without modifying + * relative order of selected and unselected elements. */ + SRT_SELECTED, + /** Randomize selected elements. */ + SRT_RANDOMIZE, + /** Reverse current order of selected elements. */ + SRT_REVERSE, }; typedef struct BMElemSort { - float srt; /* Sort factor */ - int org_idx; /* Original index of this element _in its mempool_ */ + /** Sort factor */ + float srt; + /** Original index of this element _in its mempool_ */ + int org_idx; } BMElemSort; static int bmelemsort_comp(const void *v1, const void *v2) -- cgit v1.2.3 From 0ac990d088d553c27f5360f62e142e99f087890a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 00:18:34 +1000 Subject: Cleanup: comments (long lines) in editors --- source/blender/editors/mesh/editmesh_tools.c | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fcad933e3c4..05466ce04bc 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -885,8 +885,9 @@ static void edbm_add_edge_face_exec__tricky_finalize_sel(BMesh *bm, BMElem *ele_ BM_select_history_clear(bm); /* Notes on hidden geometry: - * - un-hide the face since its possible hidden was copied when copying surrounding face attributes. - * - un-hide before adding to select history + * - Un-hide the face since its possible hidden was copied when copying + * surrounding face attributes. + * - Un-hide before adding to select history * since we may extend into an existing, hidden vert/edge. */ @@ -946,8 +947,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) BMElem *ele_desel; BMFace *ele_desel_face; - /* be extra clever, figure out if a partial selection should be extended so we can create geometry - * with single vert or single edge selection */ + /* be extra clever, figure out if a partial selection should be extended so we can create + * geometry with single vert or single edge selection. */ ele_desel = edbm_add_edge_face_exec__tricky_extend_sel(em->bm); #endif if (!EDBM_op_init(em, @@ -980,7 +981,8 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) /* Newly created faces may include existing hidden edges, * copying face data from surrounding, may have copied hidden face flag too. * - * Important that faces use flushing since 'edges.out' wont include hidden edges that already existed. + * Important that faces use flushing since 'edges.out' + * wont include hidden edges that already existed. */ BMO_slot_buffer_hflag_disable( em->bm, bmop.slots_out, "faces.out", BM_FACE, BM_ELEM_HIDDEN, true); @@ -3425,7 +3427,8 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) /* api callbacks */ ot->exec = edbm_blend_from_shape_exec; - // ot->invoke = WM_operator_props_popup_call; /* disable because search popup closes too easily */ + /* disable because search popup closes too easily */ + // ot->invoke = WM_operator_props_popup_call; ot->ui = edbm_blend_from_shape_ui; ot->poll = ED_operator_editmesh; @@ -7730,7 +7733,8 @@ static void point_normals_apply(bContext *C, wmOperator *op, float target[3], co copy_v3_v3(lnor_ed->nloc, lnor_ed->niloc); } else if (do_spherize) { - /* Note that this is *not* real spherical interpolation. Probably good enough in this case though? */ + /* Note that this is *not* real spherical interpolation. + * Probably good enough in this case though? */ const float strength = RNA_float_get(op->ptr, "spherize_strength"); float spherized_normal[3]; @@ -8810,12 +8814,13 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op) float(*smooth_normal)[3] = MEM_callocN(sizeof(*smooth_normal) * lnors_ed_arr->totloop, __func__); - /* This is weird choice of operation, taking all loops of faces of current vertex... Could lead to some rather - * far away loops weighting as much as very close ones (topologically speaking), with complex polygons. - * Using topological distance here (rather than geometrical one) makes sense imho, but would rather go with - * a more consistent and flexible code, we could even add max topological distance to take into account, - * and a weighting curve... - * Would do that later though, think for now we can live with that choice. --mont29 */ + /* This is weird choice of operation, taking all loops of faces of current vertex. + * Could lead to some rather far away loops weighting as much as very close ones + * (topologically speaking), with complex polygons. + * Using topological distance here (rather than geometrical one) + * makes sense imho, but would rather go with a more consistent and flexible code, + * we could even add max topological distance to take into account, * and a weighting curve. + * Would do that later though, think for now we can live with that choice. --mont29. */ BMLoopNorEditData *lnor_ed = lnors_ed_arr->lnor_editdata; for (int i = 0; i < lnors_ed_arr->totloop; i++, lnor_ed++) { l = lnor_ed->loop; -- cgit v1.2.3 From 620b960d3d8cfd90b9f0df6ba3671c33eccb8309 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 22 Apr 2019 09:19:45 +1000 Subject: Cleanup: style, use braces for editors --- source/blender/editors/mesh/editmesh_tools.c | 136 ++++++++++++++++++--------- 1 file changed, 91 insertions(+), 45 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 05466ce04bc..0a07b8cf6f6 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2273,12 +2273,15 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) MirrorModifierData *mmd = (MirrorModifierData *)md; if (mmd->flag & MOD_MIR_CLIPPING) { - if (mmd->flag & MOD_MIR_AXIS_X) + if (mmd->flag & MOD_MIR_AXIS_X) { mirrx = true; - if (mmd->flag & MOD_MIR_AXIS_Y) + } + if (mmd->flag & MOD_MIR_AXIS_Y) { mirry = true; - if (mmd->flag & MOD_MIR_AXIS_Z) + } + if (mmd->flag & MOD_MIR_AXIS_Z) { mirrz = true; + } clip_dist = mmd->tolerance; } @@ -2498,8 +2501,9 @@ static void mesh_set_smooth_faces(BMEditMesh *em, short smooth) BMIter iter; BMFace *efa; - if (em == NULL) + if (em == NULL) { return; + } BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) { @@ -2837,31 +2841,37 @@ static bool merge_firstlast(BMEditMesh *em, /* do sanity check in mergemenu in edit.c ?*/ if (use_first == false) { - if (!em->bm->selected.last || ((BMEditSelection *)em->bm->selected.last)->htype != BM_VERT) + if (!em->bm->selected.last || ((BMEditSelection *)em->bm->selected.last)->htype != BM_VERT) { return false; + } ese = em->bm->selected.last; mergevert = (BMVert *)ese->ele; } else { - if (!em->bm->selected.first || ((BMEditSelection *)em->bm->selected.first)->htype != BM_VERT) + if (!em->bm->selected.first || ((BMEditSelection *)em->bm->selected.first)->htype != BM_VERT) { return false; + } ese = em->bm->selected.first; mergevert = (BMVert *)ese->ele; } - if (!BM_elem_flag_test(mergevert, BM_ELEM_SELECT)) + if (!BM_elem_flag_test(mergevert, BM_ELEM_SELECT)) { return false; + } if (use_uvmerge) { if (!EDBM_op_callf( - em, wmop, "pointmerge_facedata verts=%hv vert_snap=%e", BM_ELEM_SELECT, mergevert)) + em, wmop, "pointmerge_facedata verts=%hv vert_snap=%e", BM_ELEM_SELECT, mergevert)) { return false; + } } - if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv merge_co=%v", BM_ELEM_SELECT, mergevert->co)) + if (!EDBM_op_callf( + em, wmop, "pointmerge verts=%hv merge_co=%v", BM_ELEM_SELECT, mergevert->co)) { return false; + } return true; } @@ -2888,14 +2898,16 @@ static bool merge_target(BMEditMesh *em, float fac; int i = 0; BM_ITER_MESH (v, &iter, em->bm, BM_VERTS_OF_MESH) { - if (!BM_elem_flag_test(v, BM_ELEM_SELECT)) + if (!BM_elem_flag_test(v, BM_ELEM_SELECT)) { continue; + } add_v3_v3(cent, v->co); i++; } - if (!i) + if (!i) { return false; + } fac = 1.0f / (float)i; mul_v3_fl(cent, fac); @@ -2903,16 +2915,19 @@ static bool merge_target(BMEditMesh *em, vco = co; } - if (!vco) + if (!vco) { return false; + } if (use_uvmerge) { - if (!EDBM_op_callf(em, wmop, "average_vert_facedata verts=%hv", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, wmop, "average_vert_facedata verts=%hv", BM_ELEM_SELECT)) { return false; + } } - if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv merge_co=%v", BM_ELEM_SELECT, co)) + if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv merge_co=%v", BM_ELEM_SELECT, co)) { return false; + } return true; } @@ -2996,8 +3011,9 @@ static const EnumPropertyItem *merge_type_itemf(bContext *C, EnumPropertyItem *item = NULL; int totitem = 0; - if (!C) /* needed for docs */ + if (!C) { /* needed for docs */ return merge_type_items; + } obedit = CTX_data_edit_object(C); if (obedit && obedit->type == OB_MESH) { @@ -3094,12 +3110,15 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) /* avoid losing selection state (select -> tags) */ char htype_select; - if (em->selectmode & SCE_SELECT_VERTEX) + if (em->selectmode & SCE_SELECT_VERTEX) { htype_select = BM_VERT; - else if (em->selectmode & SCE_SELECT_EDGE) + } + else if (em->selectmode & SCE_SELECT_EDGE) { htype_select = BM_EDGE; - else + } + else { htype_select = BM_FACE; + } /* store selection as tags */ BM_mesh_elem_hflag_enable_test(em->bm, htype_select, BM_ELEM_TAG, true, true, BM_ELEM_SELECT); @@ -3332,8 +3351,9 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) if (kb) { /* Perform blending on selected vertices. */ BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { - if (!BM_elem_flag_test(eve, BM_ELEM_SELECT) || BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) + if (!BM_elem_flag_test(eve, BM_ELEM_SELECT) || BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { continue; + } /* Get coordinates of shapekey we're blending from. */ sco = CustomData_bmesh_get_n(&em->bm->vdata, eve->head.data, CD_SHAPEKEY, shape); @@ -3383,8 +3403,9 @@ static const EnumPropertyItem *shape_itemf(bContext *C, int a; for (a = 0; a < em->bm->vdata.totlayer; a++) { - if (em->bm->vdata.layers[a].type != CD_SHAPEKEY) + if (em->bm->vdata.layers[a].type != CD_SHAPEKEY) { continue; + } tmp.value = totitem; tmp.identifier = em->bm->vdata.layers[a].name; @@ -3619,11 +3640,13 @@ static float bm_edge_seg_isect(const float sco_a[2], /* sqrt(m2 * m2 + 1); Only looking for change in sign. Skip extra math .*/ dist = (y12 - m2 * x12 - b2); } - else + else { dist = x22 - x12; + } - if (i == 0) + if (i == 0) { lastdist = dist; + } /* if dist changes sign, and intersect point in edge's Bound Box */ if ((lastdist * dist) <= 0) { @@ -3684,10 +3707,12 @@ static float bm_edge_seg_isect(const float sco_a[2], } } } - if ((m2 <= 1.0f) && (m2 >= -1.0f)) + if ((m2 <= 1.0f) && (m2 >= -1.0f)) { perc = (xi - x21) / (x22 - x21); - else + } + else { perc = (yi - y21) / (y22 - y21); /* lower slope more accurate */ + } //isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ break; @@ -3720,8 +3745,9 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) float(*screen_vert_coords)[2], (*sco)[2], (*mouse_path)[2]; /* edit-object needed for matrix, and ar->regiondata for projections to work */ - if (ELEM(NULL, obedit, ar, ar->regiondata)) + if (ELEM(NULL, obedit, ar, ar->regiondata)) { return OPERATOR_CANCELLED; + } if (bm->totvertsel < 2) { BKE_report(op->reports, RPT_ERROR, "No edges are selected to operate on"); @@ -3797,8 +3823,9 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BMO_slot_buffer_from_enabled_flag(bm, &bmop, bmop.slots_in, "edges", BM_EDGE, ELE_EDGE_CUT); - if (mode == KNIFE_MIDPOINT) + if (mode == KNIFE_MIDPOINT) { numcuts = 1; + } BMO_slot_int_set(bmop.slots_in, "cuts", numcuts); BMO_slot_int_set(bmop.slots_in, "quad_corner_type", SUBD_CORNER_STRAIGHT_CUT); @@ -5965,15 +5992,19 @@ static void sort_bmelem_flag(bContext *C, int affected[3] = {0, 0, 0}; int i, j; - if (!(types && flag && action)) + if (!(types && flag && action)) { return; + } - if (types & BM_VERT) + if (types & BM_VERT) { totelem[0] = em->bm->totvert; - if (types & BM_EDGE) + } + if (types & BM_EDGE) { totelem[1] = em->bm->totedge; - if (types & BM_FACE) + } + if (types & BM_FACE) { totelem[2] = em->bm->totface; + } if (ELEM(action, SRT_VIEW_ZAXIS, SRT_VIEW_XAXIS)) { float mat[4][4]; @@ -6185,8 +6216,9 @@ static void sort_bmelem_flag(bContext *C, int aff = affected[j]; tb = tbuf[j]; mp = map[j]; - if (!(tb && mp)) + if (!(tb && mp)) { continue; + } if (ELEM(aff, 0, tot)) { MEM_freeN(tb); MEM_freeN(mp); @@ -6327,12 +6359,15 @@ static void sort_bmelem_flag(bContext *C, /* printf("%d faces: %d to be affected...\n", totelem[2], affected[2]);*/ if (affected[0] == 0 && affected[1] == 0 && affected[2] == 0) { for (j = 3; j--;) { - if (pblock[j]) + if (pblock[j]) { MEM_freeN(pblock[j]); - if (sblock[j]) + } + if (sblock[j]) { MEM_freeN(sblock[j]); - if (map[j]) + } + if (map[j]) { MEM_freeN(map[j]); + } } return; } @@ -6362,10 +6397,12 @@ static void sort_bmelem_flag(bContext *C, } } } - if (pb) + if (pb) { MEM_freeN(pb); - if (sb) + } + if (sb) { MEM_freeN(sb); + } } BM_mesh_remap(em->bm, map[0], map[1], map[2]); @@ -6373,8 +6410,9 @@ static void sort_bmelem_flag(bContext *C, WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); for (j = 3; j--;) { - if (map[j]) + if (map[j]) { MEM_freeN(map[j]); + } } } @@ -6406,12 +6444,15 @@ static int edbm_sort_elements_exec(bContext *C, wmOperator *op) } else { BMEditMesh *em = BKE_editmesh_from_object(ob_active); - if (em->selectmode & SCE_SELECT_VERTEX) + if (em->selectmode & SCE_SELECT_VERTEX) { elem_types |= BM_VERT; - if (em->selectmode & SCE_SELECT_EDGE) + } + if (em->selectmode & SCE_SELECT_EDGE) { elem_types |= BM_EDGE; - if (em->selectmode & SCE_SELECT_FACE) + } + if (em->selectmode & SCE_SELECT_FACE) { elem_types |= BM_FACE; + } RNA_enum_set(op->ptr, "elements", elem_types); } @@ -6453,18 +6494,22 @@ static bool edbm_sort_elements_poll_property(const bContext *UNUSED(C), /* Only show seed for randomize action! */ if (STREQ(prop_id, "seed")) { - if (action == SRT_RANDOMIZE) + if (action == SRT_RANDOMIZE) { return true; - else + } + else { return false; + } } /* Hide seed for reverse and randomize actions! */ if (STREQ(prop_id, "reverse")) { - if (ELEM(action, SRT_RANDOMIZE, SRT_REVERSE)) + if (ELEM(action, SRT_RANDOMIZE, SRT_REVERSE)) { return false; - else + } + else { return true; + } } return true; @@ -7601,8 +7646,9 @@ wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf) wmKeyMap *keymap = WM_modalkeymap_get(keyconf, keymap_name); /* We only need to add map once */ - if (keymap && keymap->modal_items) + if (keymap && keymap->modal_items) { return NULL; + } keymap = WM_modalkeymap_add(keyconf, keymap_name, modal_items); -- cgit v1.2.3 From 0e4e1d257cd0e7e033e6fc53be9909d3297cc0c0 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 22 Apr 2019 10:10:19 -0300 Subject: Rename: Separate: By loose parts > By Loose Parts --- source/blender/editors/mesh/editmesh_tools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 0a07b8cf6f6..349acf754ce 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4297,7 +4297,7 @@ void MESH_OT_separate(wmOperatorType *ot) static const EnumPropertyItem prop_separate_types[] = { {MESH_SEPARATE_SELECTED, "SELECTED", 0, "Selection", ""}, {MESH_SEPARATE_MATERIAL, "MATERIAL", 0, "By Material", ""}, - {MESH_SEPARATE_LOOSE, "LOOSE", 0, "By loose parts", ""}, + {MESH_SEPARATE_LOOSE, "LOOSE", 0, "By Loose Parts", ""}, {0, NULL, 0, NULL, NULL}, }; -- cgit v1.2.3 From c7f67d60fbe24df942bcde49aadf480ac6622e71 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 29 Apr 2019 19:29:41 +1000 Subject: Cleanup: comments (long lines) in editors --- source/blender/editors/mesh/editmesh_tools.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 349acf754ce..fcca91d4167 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2810,7 +2810,9 @@ void MESH_OT_colors_reverse(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around"); +#if 0 + RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around"); +#endif } /** \} */ @@ -7010,7 +7012,8 @@ void MESH_OT_offset_edge_loops(wmOperatorType *ot) ot->exec = edbm_offset_edgeloop_exec; ot->poll = ED_operator_editmesh; - /* Keep internal, since this is only meant to be accessed via 'MESH_OT_offset_edge_loops_slide' */ + /* Keep internal, since this is only meant to be accessed via + * 'MESH_OT_offset_edge_loops_slide'. */ /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; -- cgit v1.2.3 From 909665a0d4ed23620afc537c583a6e84cdee50b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 1 May 2019 11:09:22 +1000 Subject: ClangFormat: run with ReflowComments on source/ Prepare for enabling ReflowComments. --- source/blender/editors/mesh/editmesh_tools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fcca91d4167..2d6be5a063f 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2774,7 +2774,7 @@ void MESH_OT_uvs_reverse(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around"); + // RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around"); } void MESH_OT_colors_rotate(wmOperatorType *ot) @@ -3573,7 +3573,7 @@ static float bm_edge_seg_isect(const float sco_a[2], float threshold = 0.0; int i; - //threshold = 0.000001; /* tolerance for vertex intersection */ + // threshold = 0.000001; /* tolerance for vertex intersection */ // XXX threshold = scene->toolsettings->select_thresh / 100; /* Get screen coords of verts */ @@ -3715,7 +3715,7 @@ static float bm_edge_seg_isect(const float sco_a[2], else { perc = (yi - y21) / (y22 - y21); /* lower slope more accurate */ } - //isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ + // isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ break; } -- cgit v1.2.3 From df712d74a25b70446e2efccf47d23cbbde299a9a Mon Sep 17 00:00:00 2001 From: George Vogiatzis Date: Wed, 1 May 2019 15:44:26 +0200 Subject: UI: improve readability of Normals menu in edit mode Also rename operators to match names in the menu. Differential Revision: https://developer.blender.org/D4659 --- source/blender/editors/mesh/editmesh_tools.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 2d6be5a063f..7d9bb4230c9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2209,7 +2209,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) void MESH_OT_normals_make_consistent(wmOperatorType *ot) { /* identifiers */ - ot->name = "Make Normals Consistent"; + ot->name = "Recalculate Normals"; ot->description = "Make face and vertex normals point either outside or inside the mesh"; ot->idname = "MESH_OT_normals_make_consistent"; @@ -8927,7 +8927,7 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op) void MESH_OT_smoothen_normals(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Smoothen Normals"; + ot->name = "Smooth Normals Vectors"; ot->description = "Smoothen custom normals based on adjacent vertex normals"; ot->idname = "MESH_OT_smoothen_normals"; @@ -9004,7 +9004,7 @@ static int edbm_mod_weighted_strength_exec(bContext *C, wmOperator *op) void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot) { /* identifiers */ - ot->name = "Face Strength"; + ot->name = "Face Normals Strength"; ot->description = "Set/Get strength of face (used in Weighted Normal modifier)"; ot->idname = "MESH_OT_mod_weighted_strength"; -- cgit v1.2.3 From a914765221fb370244998c805f0750c2370fbfe4 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Thu, 2 May 2019 21:50:54 +1000 Subject: UI: rename 'Remove Doubles' to 'Merge by Distance' Also add into the "Merge" menu. --- source/blender/editors/mesh/editmesh_tools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh/editmesh_tools.c') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 7d9bb4230c9..cd9d046ae04 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3169,8 +3169,8 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) void MESH_OT_remove_doubles(wmOperatorType *ot) { /* identifiers */ - ot->name = "Remove Doubles"; - ot->description = "Remove duplicate vertices"; + ot->name = "Merge by Distance"; + ot->description = "Merge vertices based on their proximity"; ot->idname = "MESH_OT_remove_doubles"; /* api callbacks */ -- cgit v1.2.3