diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-14 07:13:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-14 07:13:51 +0400 |
commit | ebde2d579a8e53a95f0f6cb8c0ca016c44ec9744 (patch) | |
tree | 7ee846aa85b9c1deb84b802086c11456001ddae1 /source/blender/editors/uvedit | |
parent | 54ff14c29ded160c05389a0ca08c771aa01a41ab (diff) |
each different remove doubles function used a different property name, use 'threshold' for all now.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 0ca25096359..c47670cd101 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1562,6 +1562,8 @@ typedef struct UVvert { static int remove_doubles_exec(bContext *C, wmOperator *op) { + const float threshold = RNA_float_get(op->ptr, "threshold"); + SpaceImage *sima; Scene *scene; Object *obedit; @@ -1572,7 +1574,6 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) int uv_b_index; float *uv_a; float *uv_b; - float weld_dist; MLoopUV **loop_arr = NULL; BLI_array_declare(loop_arr); @@ -1588,9 +1589,6 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) em = BMEdit_FromObject(obedit); ima = CTX_data_edit_image(C); - weld_dist = RNA_float_get(op->ptr, "weld_dist"); - - BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); if (!uvedit_face_visible_test(scene, ima, efa, tf)) @@ -1625,7 +1623,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op) for (uv_b_index = uv_a_index + 1; uv_b_index < BLI_array_count(vert_arr); uv_b_index++) { uv_b = vert_arr[uv_b_index].uv_loop->uv; if ((vert_arr[uv_b_index].weld == FALSE) && - (len_manhattan_v2v2(uv_a, uv_b) < weld_dist)) + (len_manhattan_v2v2(uv_a, uv_b) < threshold)) { minmax_v2v2_v2(uv_max, uv_min, uv_b); BLI_array_append(loop_arr, vert_arr[uv_b_index].uv_loop); @@ -1663,7 +1661,8 @@ static void UV_OT_remove_doubles(wmOperatorType *ot) ot->exec = remove_doubles_exec; ot->poll = ED_operator_uvedit; - RNA_def_float(ot->srna, "weld_dist", 0.02f, 0.0f, 10.0f, "Weld Distance", "Maximum distance between welded vertices", 0.0f, 1.0f); + RNA_def_float(ot->srna, "threshold", 0.02f, 0.0f, 10.0f, + "Merge Distance", "Maximum distance between welded vertices", 0.0f, 1.0f); } /* ******************** weld operator **************** */ |