Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-04-11 15:52:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-11 15:52:21 +0400
commitc56b39b8ddda615d85bb6d2dcdcb9e3fa3dc483f (patch)
tree32f3451d34a7c536db2db9fc7e41cf0705e21db3 /source/blender/blenloader
parenta8226cbcb24b225670e0f30d79eb180c8b858b1e (diff)
write mesh selection history to the blend file. without this active edge/vert are lost on UNDO.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/blenloader/intern/writefile.c2
2 files changed, 3 insertions, 1 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);