Revision: 44019
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44019
Author:   campbellbarton
Date:     2012-02-10 15:25:12 +0000 (Fri, 10 Feb 2012)
Log Message:
-----------
fix for smooth not working with mirror clip.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/operators/utils.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c

Modified: branches/bmesh/blender/source/blender/bmesh/operators/utils.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/utils.c       
2012-02-10 15:00:55 UTC (rev 44018)
+++ branches/bmesh/blender/source/blender/bmesh/operators/utils.c       
2012-02-10 15:25:12 UTC (rev 44019)
@@ -421,11 +421,11 @@
                mul_v3_fl(co, 1.0f / (float)j);
                mid_v3_v3v3(co, co, v->co);
 
-               if (clipx && fabsf(v->co[0]) < clipdist)
+               if (clipx && fabsf(v->co[0]) <= clipdist)
                        co[0] = 0.0f;
-               if (clipy && fabsf(v->co[1]) < clipdist)
+               if (clipy && fabsf(v->co[1]) <= clipdist)
                        co[1] = 0.0f;
-               if (clipz && fabsf(v->co[2]) < clipdist)
+               if (clipz && fabsf(v->co[2]) <= clipdist)
                        co[2] = 0.0f;
 
                i++;

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2012-02-10 15:00:55 UTC (rev 44018)
+++ branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2012-02-10 15:25:12 UTC (rev 44019)
@@ -1608,6 +1608,7 @@
        ModifierData *md;
        int mirrx=0, mirry=0, mirrz=0;
        int i, repeat;
+       float clipdist = 0.0f;
 
        /* mirror before smooth */
        if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) {
@@ -1628,6 +1629,8 @@
                                        mirry = 1;
                                if (mmd->flag & MOD_MIR_AXIS_Z)
                                        mirrz = 1;
+
+                               clipdist = mmd->tolerance;
                        }
                }
        }
@@ -1637,8 +1640,9 @@
                repeat = 1;
        
        for (i=0; i<repeat; i++) {
-               if (!EDBM_CallOpf(em, op, "vertexsmooth verts=%hv 
mirror_clip_x=%d mirror_clip_y=%d mirror_clip_z=%d",
-                                 BM_SELECT, mirrx, mirry, mirrz))
+               if (!EDBM_CallOpf(em, op,
+                                 "vertexsmooth verts=%hv mirror_clip_x=%d 
mirror_clip_y=%d mirror_clip_z=%d clipdist=%f",
+                                 BM_SELECT, mirrx, mirry, mirrz, clipdist))
                {
                        return OPERATOR_CANCELLED;
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to