Fixed bug #22361, missing graphics when sculpting with pinned shape keys
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 7 Jun 2010 03:48:41 +0000 (03:48 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 7 Jun 2010 03:48:41 +0000 (03:48 +0000)
* Problem was that the sculpt PBVH was only used for redrawing if the derived mesh's vertices were equal the base mesh's vertices, which isn't the case when sculpting on shape keys.

source/blender/blenkernel/intern/cdderivedmesh.c

index e15e5bc9b45fb99ca404177d64a9e55016d58483..cadf5f375b5cb90240d8dce4b7804c0d63c985fd 100644 (file)
@@ -200,7 +200,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
                return NULL;
        if(ob->sculpt->pbvh) {
                cddm->pbvh= ob->sculpt->pbvh;
-               cddm->pbvh_draw = (cddm->mvert == me->mvert);
+               cddm->pbvh_draw = (cddm->mvert == me->mvert) || ob->sculpt->kb;
        }
 
        /* always build pbvh from original mesh, and only use it for drawing if
@@ -208,7 +208,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
           that this is actually for, to support a pbvh on a modified mesh */
        if(!cddm->pbvh && ob->type == OB_MESH) {
                cddm->pbvh = BLI_pbvh_new();
-               cddm->pbvh_draw = (cddm->mvert == me->mvert);
+               cddm->pbvh_draw = (cddm->mvert == me->mvert) || ob->sculpt->kb;
                BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
                                   me->totface, me->totvert);
        }