diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-25 15:02:47 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-25 15:02:47 +0300 |
commit | b16a1c5ad266bc9f981673b59ced2b20b9a54495 (patch) | |
tree | 7232e92400e21de31297e4cb3f3abb28c2cfb117 /source/blender/src/meshtools.c | |
parent | a9d6a57745365a39bb42c98364c0c92b3672c891 (diff) |
Bug fix #1844
Joining Meshes, with the active Mesh having no vertexgroups, and other
Meshes having them didn't work.
Diffstat (limited to 'source/blender/src/meshtools.c')
-rw-r--r-- | source/blender/src/meshtools.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 65f0187dc8e..bf832024d20 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -130,7 +130,7 @@ void join_mesh(void) float imat[4][4], cmat[4][4]; int a, b, totcol, totedge=0, totvert=0, totface=0, ok=0, vertofs, map[MAXMAT]; int hasedges=0; - int i, j, index, haskey=0; + int i, j, index, haskey=0, hasdefgroup=0; bDeformGroup *dg, *odg; MDeformVert *dvert, *dvertmain; @@ -204,6 +204,8 @@ void join_mesh(void) // Join this object's vertex groups to the base one's for (dg=base->object->defbase.first; dg; dg=dg->next){ + hasdefgroup= 1; + /* See if this group exists in the object */ for (odg=ob->defbase.first; odg; odg=odg->next){ if (!strcmp(odg->name, dg->name)){ @@ -260,7 +262,7 @@ void join_mesh(void) if(me->tface || testSelected_TfaceMesh()) tface= tfacemain= MEM_callocN(totface*4*sizeof(TFace), "joinmesh4"); else tfacemain= NULL; - if(me->dvert) + if(me->dvert || hasdefgroup) dvert= dvertmain= MEM_callocN(totvert*sizeof(MDeformVert), "joinmesh5"); else dvert=dvertmain= NULL; |