From cb22649e0b5ef2cb4ddfac5d4dccec102e44ce0e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 2 Mar 2010 15:33:33 +0000 Subject: [PATCH] convert to mesh (Alt+C), was failing in cases when MDef was used. make the mesh from the original rather then the copy. --- source/blender/editors/object/object_add.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 1ec3a82fc58..f0aaef63c68 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1261,7 +1261,10 @@ static int convert_exec(bContext *C, wmOperator *op) ob1->data= copy_mesh(me); /* make new mesh data from the original copy */ - dm= mesh_get_derived_final(scene, ob1, CD_MASK_MESH); + /* note: get the mesh from the original, not from the copy in some + * cases this doesnt give correct results (when MDEF is used for eg) + */ + dm= mesh_get_derived_final(scene, ob, CD_MASK_MESH); /* dm= mesh_create_derived_no_deform(ob1, NULL); this was called original (instead of get_derived). man o man why! (ton) */ DM_to_mesh(dm, ob1->data);