Bug fix #1844
authorTon Roosendaal <ton@blender.org>
Thu, 25 Nov 2004 12:02:47 +0000 (12:02 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 25 Nov 2004 12:02:47 +0000 (12:02 +0000)
Joining Meshes, with the active Mesh having no vertexgroups, and other
Meshes having them didn't work.

source/blender/src/meshtools.c
source/blender/src/screendump.c

index 65f0187dc8e035d45e78c71960147539073947cf..bf832024d20db2039b8fe50d862a03f629065b44 100644 (file)
@@ -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;
 
index 0cb032620ed34b7aa88edc49e9e7480e2526c4e4..114be17afa355bc98c3e980db35a2d114990d121 100644 (file)
@@ -99,7 +99,6 @@ void write_screendump(char *name)
                        }
                        else ibuf->ftype= TGA;  
                        
-                       IMB_gamwarp(ibuf, 1.0+G.rt/100.0);
                        if(G.scene->r.planes == 8) IMB_cspace(ibuf, rgb_to_bw);
                        
                        IMB_saveiff(ibuf, name, IB_rect);