Fixed bug #22361, missing graphics when sculpting with pinned shape keys

* 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.
This commit is contained in:
Nicholas Bishop 2010-06-07 03:48:41 +00:00
parent 61f50707a4
commit 3efcdf5d47

@ -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);
}