write mesh selection history to the blend file. without this active edge/vert are lost on UNDO.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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! */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user