diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-11 15:52:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-11 15:52:21 +0400 |
commit | c56b39b8ddda615d85bb6d2dcdcb9e3fa3dc483f (patch) | |
tree | 32f3451d34a7c536db2db9fc7e41cf0705e21db3 | |
parent | a8226cbcb24b225670e0f30d79eb180c8b858b1e (diff) |
write mesh selection history to the blend file. without this active edge/vert are lost on UNDO.
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5114be4f785..7c5438997bb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -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 */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index c3f77f786c1..7f2bb72bf49 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -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); diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 1934ae8aa3a..5d55bb8a4db 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -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! */ |