diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-23 13:25:34 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-23 13:25:34 +0400 |
commit | d7306104570a91a56bf02101b89cb01781fc4294 (patch) | |
tree | a4c39453ab6f84063dbe6faacb4b0d3fa70cc340 /source/blender/editors/mesh/editmesh.c | |
parent | ef14d310a056d2af484d866acaf512fa80f8442d (diff) |
Fix #26959: change selection of shapekeys in edit mode causes mesh deformity of a key
Vertex offset, which was used to update referenced keys was calculating between
editmesh (which represents shapekey data) and base mesh (ob->mesh) which represents
Bases key.
This commit fixes bug with incorrect ofsset calculation for case when some keys
got other (not Basis) keys as relative key by calculating offset using EditMesh
(new shapekey data) and keyblock data (which was used to create EditMesh when
entering edit mode).
This commit shouldn't lead to regressions, but maybe there's something else
which should be fixed for such kinda complicated cases -- more testing would
be welcome.
Diffstat (limited to 'source/blender/editors/mesh/editmesh.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c index 0165b9794ca..ec08bfccda3 100644 --- a/source/blender/editors/mesh/editmesh.c +++ b/source/blender/editors/mesh/editmesh.c @@ -1177,13 +1177,14 @@ void load_editMesh(Scene *scene, Object *obedit) } if(act_is_basis) { /* active key is a base */ + float (*fp)[3]= actkey->data; i=0; ofs= MEM_callocN(sizeof(float) * 3 * em->totvert, "currkey->data"); eve= em->verts.first; mvert = me->mvert; while(eve) { if(eve->keyindex>=0) - VECSUB(ofs[i], mvert->co, oldverts[eve->keyindex].co); + VECSUB(ofs[i], mvert->co, fp[eve->keyindex]); eve= eve->next; i++; |