Fix for bug #5345, sculpt tool doesn't seems to use correctly the undo setting on...
[blender-staging.git] / source / blender / src / multires.c
index 4a0c058f54c6d21b35403a5e620a261d18815fcb..e9e763f10ae1108c97fb6c071499e5e0235a4a1a 100644 (file)
@@ -1063,8 +1063,11 @@ void multires_level_to_mesh(Object *ob, Mesh *me)
        /* Vertices/Edges/Faces */
        
        for(i=0; i<lvl->totvert; ++i) {
-               if(em)
+               if(em) {
                        eves[i]= addvertlist(lvl->verts[i].co, NULL); /* TODO */
+                       if(lvl->verts[i].flag & 1) eves[i]->f |= SELECT;
+                       if(lvl->verts[i].flag & ME_HIDE) eves[i]->h= 1;
+               }
                else
                        me->mvert[i]= lvl->verts[i];
        }