Fox #31185: Cannot sculpt shape keys

Was related on sculpting on locked keys. Issue was caused by building
PBVH from base mesh which is now doesn't have shape key loaded into
it as it was in 2.62.

Fixed by loading coordinates from deformed mesh into PBVH like it
happens for on-locked shape keys.
This commit is contained in:
Sergey Sharybin
2012-05-01 12:14:44 +00:00
parent 2f38f09c38
commit 8bd5648ce5

View File

@@ -267,6 +267,8 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
if (!cddm->pbvh && ob->type == OB_MESH) {
SculptSession *ss= ob->sculpt;
Mesh *me= ob->data;
int deformed = 0;
cddm->pbvh = BLI_pbvh_new();
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
@@ -275,7 +277,9 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
me->totface, me->totvert);
if (ss->modifiers_active && ob->derivedDeform) {
deformed = ss->modifiers_active || me->key;
if (deformed && ob->derivedDeform) {
DerivedMesh *deformdm= ob->derivedDeform;
float (*vertCos)[3];
int totvert;