Fix for bug #13624: knife cut with vertex snapping was broken.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 30 Sep 2008 07:01:37 +0000 (07:01 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 30 Sep 2008 07:01:37 +0000 (07:01 +0000)
source/blender/src/editmesh_tools.c

index af2246131e3381c07629aee1c8dd5173fe63ee85..76f1443616f970a6523a3d19ff454494489f2d64 100644 (file)
@@ -2433,7 +2433,11 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
 
        //Set faces f1 to 0 cause we need it later
        for(ef=em->faces.first;ef;ef = ef->next) ef->f1 = 0;
-       for(eve=em->verts.first; eve; eve=eve->next) eve->f1 = eve->f2 = 0;
+       for(eve=em->verts.first; eve; eve=eve->next) {
+               if(!(beauty & B_KNIFE)) /* knife sets this flag for vertex cuts */
+                       eve->f1 = 0;
+               eve->f2 = 0;
+       }
 
        for (; md; md=md->next) {
                if (md->type==eModifierType_Mirror) {