forked from bartvdbraak/blender
bmesh: proper sculpting on non-multires object
Problem was caused by unneeded call of CDDM_calc_normals when creating derived mesh for object which duplicated mvert array. It shouldn't happen unless object has got shapekeys or deformation modifiers on the top of stack.
This commit is contained in:
parent
3b891aea5c
commit
2936ca5d04
@ -1354,15 +1354,21 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
} else if(dm) {
|
||||
finaldm = dm;
|
||||
} else {
|
||||
int recalc_normals= 0;
|
||||
|
||||
finaldm = CDDM_from_mesh(me, ob);
|
||||
|
||||
if (build_shapekey_layers)
|
||||
if(build_shapekey_layers) {
|
||||
add_shapekey_layers(finaldm, me, ob);
|
||||
recalc_normals= 1;
|
||||
}
|
||||
|
||||
if(deformedVerts) {
|
||||
CDDM_apply_vert_coords(finaldm, deformedVerts);
|
||||
recalc_normals= 1;
|
||||
}
|
||||
|
||||
if(recalc_normals)
|
||||
CDDM_calc_normals(finaldm);
|
||||
|
||||
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
|
||||
|
@ -239,7 +239,7 @@ static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
|
||||
if(deformed)
|
||||
return 0;
|
||||
|
||||
return dm->deformedOnly || ob->sculpt->kb;
|
||||
return cddm->mvert == me->mvert || ob->sculpt->kb;
|
||||
}
|
||||
|
||||
static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
|
||||
|
Loading…
Reference in New Issue
Block a user