svn merge -r 12856:12937 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / python / api2_2x / Mesh.c
index 8248816bc3d46f178130d0a3c24db6ef0641def0..323be4e89e55a299f402a7c6a13c0e5591d11b69 100644 (file)
@@ -5394,7 +5394,7 @@ static PyObject *MFaceSeq_delete( BPy_MFaceSeq * self, PyObject *args )
                return EXPP_ReturnPyObjError( PyExc_TypeError,
                                "sequence must contain at least one int or MFace" );
 
-       face_table = (unsigned int *)MEM_callocN( len*sizeof( unsigned int ),
+       face_table = MEM_callocN( len*sizeof( unsigned int ),
                        "face_table" );
 
        /* get the indices of faces to be removed */
@@ -5517,15 +5517,12 @@ static PyObject *MFaceSeq_delete( BPy_MFaceSeq * self, PyObject *args )
                                ++face_count;
                        }
                }
-
-               /* for each face, deselect each edge */
+               
+               /* for each remaining face, select all edges */
                tmpface = mesh->mface;
                fface = (struct fourEdges *)face_edges;
                for( i = mesh->totface; i--; ++tmpface, ++fface ) {
                        if( tmpface->v1 != UINT_MAX ) {
-                               FaceEdges (*face)[4];
-                               face = (void *)face_edges;
-                               face += face_table[i];
                                fface->v[0]->sel = 1;
                                fface->v[1]->sel = 1;
                                fface->v[2]->sel = 1;
@@ -5533,7 +5530,6 @@ static PyObject *MFaceSeq_delete( BPy_MFaceSeq * self, PyObject *args )
                                        fface->v[3]->sel = 1;
                        }
                }
-
                /* now mark the selected edges for deletion */
 
                edge_count = 0;