From 718569dc16e35ef37838d0357f75e945a96928b1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 27 Jul 2012 17:35:02 +0000 Subject: Fix #32199: Smooth Vertex no longer has X, Y and Z options. --- source/blender/editors/mesh/editmesh_tools.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 56d61d92b0f..a869886355a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -1533,6 +1533,10 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) int i, repeat; float clipdist = 0.0f; + int xaxis = RNA_boolean_get(op->ptr, "xaxis"); + int yaxis = RNA_boolean_get(op->ptr, "yaxis"); + int zaxis = RNA_boolean_get(op->ptr, "zaxis"); + /* mirror before smooth */ if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) { EDBM_verts_mirror_cache_begin(em, TRUE); @@ -1564,8 +1568,9 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) for (i = 0; i < repeat; i++) { if (!EDBM_op_callf(em, op, - "smooth_vert verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f", - BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist)) + "smooth_vert verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f " + "use_axis_x=%b use_axis_y=%b use_axis_z=%b", + BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist, xaxis, yaxis, zaxis)) { return OPERATOR_CANCELLED; } @@ -1597,6 +1602,9 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX); + RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis"); + RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis"); + RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis"); } /********************** Smooth/Solid Operators *************************/ -- cgit v1.2.3