diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-12 15:27:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-12 15:27:50 +0400 |
commit | ca8fd669a4ab2e1a8eb6421f8b6c815a30e2ca9c (patch) | |
tree | 5b82abb1657ed33309b2ad1a426b5c31eb7f97c1 | |
parent | 115e762556d51379f2cb3495c2ac254a77328e95 (diff) |
bmesh shape key conversion.
- remove print for impossible error.
- add NULL check incase bmesh and mesh get out of sync (would crash if Basis key-block couldn't be found).
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_conv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index 8817784bb3c..cd3e6b2f759 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -198,9 +198,6 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr) bm->vdata.layers[j].uid = block->uid; } } - else if (actkey) { - printf("shapekey <-> mesh mismatch!\n"); - } CustomData_bmesh_init_pool(&bm->vdata, me->totvert, BM_VERT); CustomData_bmesh_init_pool(&bm->edata, me->totedge, BM_EDGE); @@ -764,7 +761,11 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess) /* editing the base key should update others */ - if (me->key->type == KEY_RELATIVE && oldverts) { + if ((me->key->type == KEY_RELATIVE) && /* only need offsets for relative shape keys */ + (actkey != NULL) && /* unlikely, but the active key may not be valid if the + * bmesh and the mesh are out of sync */ + (oldverts != NULL)) /* not used here, but 'oldverts' is used later for applyig 'ofs' */ + { int act_is_basis = FALSE; /* find if this key is a basis for any others */ |