Shape Keys

Internal change to not apply the shape keys to the Mesh vertex coordinates,
but rather use it as part of the derivedmesh/displist evaluation. This only
has one practical advantage right now, which is that you can now make a
linked duplicate and pin it's shape key to a different shape than the first
object.

Further, this makes shape keys correctly fit into the modifier stack design,
which will help implement some other features later. Also it means the mesh
vertex coordinates are now really the orco's.
This commit is contained in:
2009-10-22 09:31:07 +00:00
parent ddf965b63a
commit 06d57fdae0
19 changed files with 424 additions and 444 deletions

View File

@@ -1755,8 +1755,8 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
*final_r = NULL;
if(useDeform) {
if(useDeform > 0 && do_ob_key(scene, ob)) /* shape key makes deform verts */
deformedVerts = mesh_getVertexCos(me, &numVerts);
if(useDeform > 0)
deformedVerts= (float(*)[3])do_ob_key(scene, ob); /* shape key makes deform verts */
else if(inputVertexCos)
deformedVerts = inputVertexCos;
@@ -1800,7 +1800,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
if(inputVertexCos)
deformedVerts = inputVertexCos;
else
deformedVerts = mesh_getRefKeyCos(me, &numVerts);
deformedVerts = mesh_getVertexCos(me, &numVerts);
}
@@ -2031,6 +2031,9 @@ static void editmesh_calc_modifiers(Scene *scene, Object *ob, EditMesh *em, Deri
datamasks = modifiers_calcDataMasks(ob, md, dataMask, required_mode);
/* doesn't work, shape keys are not updated from editmesh.
deformedVerts= (float(*)[3])do_ob_key(scene, ob); */
curr = datamasks;
for(i = 0; md; i++, md = md->next, curr = curr->next) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);