diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-06 14:25:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-11-06 14:25:48 +0300 |
commit | f66aeb7a742a1668ebe9cdd7b06cc83606bb55f4 (patch) | |
tree | 327d47d1b25a4a95902ccf52f9393fe19b798797 /source/blender/blenkernel/intern | |
parent | e2504c2ff1aa3bfb2df446e007ee9fae0993a9ee (diff) |
Bugfix:
Mesh deform modifier crashed when applied to lattices.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index b805e3827d2..8e60964c28d 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -5118,15 +5118,15 @@ static void meshdeformModifier_deformVerts( { DerivedMesh *dm; - if(derivedData) dm = CDDM_copy(derivedData); - else dm = CDDM_from_mesh(ob->data, ob); - - CDDM_apply_vert_coords(dm, vertexCos); - CDDM_calc_normals(dm); + if(!derivedData && ob->type==OB_MESH) + dm= CDDM_from_mesh(ob->data, ob); + else + dm= derivedData; meshdeformModifier_do(md, ob, dm, vertexCos, numVerts); - dm->release(dm); + if(dm != derivedData) + dm->release(dm); } static void meshdeformModifier_deformVertsEM( @@ -5135,15 +5135,15 @@ static void meshdeformModifier_deformVertsEM( { DerivedMesh *dm; - if(derivedData) dm = CDDM_copy(derivedData); - else dm = CDDM_from_editmesh(editData, ob->data); - - CDDM_apply_vert_coords(dm, vertexCos); - CDDM_calc_normals(dm); + if(!derivedData && ob->type == OB_MESH) + dm = CDDM_from_editmesh(editData, ob->data); + else + dm = derivedData; meshdeformModifier_do(md, ob, dm, vertexCos, numVerts); - dm->release(dm); + if(dm != derivedData) + dm->release(dm); } /***/ |