dissolve faces: errors-out on holes, preserves winding, and doesn't delete original...
[blender.git] / source / blender / bmesh / intern / bmesh_to_editmesh.c
index 99de531e7cd88391cef872b56b2fc70941e79c2e..12bf0bf5e86908e6858b3e8c22efed7a8147f034 100644 (file)
@@ -167,7 +167,6 @@ static EditFace *bmeshface_to_editface(BMesh *bm, EditMesh *em, BMFace *f, EditV
 
        efa->mat_nr = (unsigned char)f->mat_nr;
 
-
        /*Copy normal*/
        efa->n[0] = f->no[0];
        efa->n[1] = f->no[1];
@@ -177,6 +176,7 @@ static EditFace *bmeshface_to_editface(BMesh *bm, EditMesh *em, BMFace *f, EditV
        if (f->head.flag & BM_SELECT) efa->f |= SELECT;
        if (f->head.flag & BM_HIDDEN) efa->h = 1;
        if (f->head.flag & BM_SMOOTH) efa->flag |= ME_SMOOTH;
+       if (f->head.flag & BM_ACTIVE) EM_set_actFace(em, efa);
 
        CustomData_em_copy_data(&bm->pdata, &em->fdata, f->data, &efa->data);
        loops_to_editmesh_corners(bm, &em->fdata, efa->data, f, numCol,numTex);
@@ -231,6 +231,10 @@ EditMesh *bmesh_to_editmesh_intern(BMesh *bm)
 
        EM_fgon_flags(em);
 
+       EM_nvertices_selected(em);
+       EM_nedges_selected(em);
+       EM_nfaces_selected(em);
+
        return em;
 }