write mesh selection history to the blend file. without this active edge/vert are lost on UNDO.

This commit is contained in:
Campbell Barton
2012-04-11 11:52:21 +00:00
parent a8226cbcb2
commit c56b39b8dd
3 changed files with 4 additions and 2 deletions

View File

@@ -3838,6 +3838,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->mloopcol= newdataadr(fd, mesh->mloopcol);
mesh->mloopuv= newdataadr(fd, mesh->mloopuv);
mesh->mtpoly= newdataadr(fd, mesh->mtpoly);
mesh->mselect = newdataadr(fd, mesh->mselect);
/* animdata */
mesh->adt= newdataadr(fd, mesh->adt);
@@ -3884,7 +3885,6 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->bb= NULL;
mesh->mselect = NULL;
mesh->edit_btmesh= NULL;
/* Multires data */

View File

@@ -1728,6 +1728,7 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
if (mesh->adt) write_animdata(wd, mesh->adt);
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);
writedata(wd, DATA, sizeof(MSelect) * mesh->totselect, mesh->mselect);
write_customdata(wd, &mesh->id, mesh->totvert, &mesh->vdata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0);
@@ -1793,6 +1794,7 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
if (mesh->adt) write_animdata(wd, mesh->adt);
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);
/* writedata(wd, DATA, sizeof(MSelect) * mesh->totselect, mesh->mselect); */ /* pre-bmesh NULL's */
write_customdata(wd, &mesh->id, mesh->totvert, &mesh->vdata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0);

View File

@@ -67,6 +67,7 @@ typedef struct Mesh {
struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
struct Key *key;
struct Material **mat;
struct MSelect *mselect;
/* BMESH ONLY */
/*new face structures*/
@@ -91,7 +92,6 @@ typedef struct Mesh {
struct MCol *mcol;
struct MSticky *msticky;
struct Mesh *texcomesh;
struct MSelect *mselect;
struct BMEditMesh *edit_btmesh; /* not saved in file! */