Added support for load/save of multires edge flags

This commit is contained in:
2007-01-01 07:53:14 +00:00
parent 7212711225
commit 2406567b7d
2 changed files with 4 additions and 1 deletions

View File

@@ -2532,6 +2532,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
link_list(fd, &mesh->mr->levels);
lvl= mesh->mr->levels.first;
direct_link_customdata(fd, &mesh->mr->vdata, lvl->totvert);
mesh->mr->edge_flags= newdataadr(fd, mesh->mr->edge_flags);
for(; lvl; lvl= lvl->next) {
lvl->verts= newdataadr(fd, lvl->verts);
lvl->faces= newdataadr(fd, lvl->faces);

View File

@@ -1174,8 +1174,10 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
writestruct(wd, DATA, "Multires", 1, mesh->mr);
if(mesh->mr) {
lvl= mesh->mr->levels.first;
if(lvl)
if(lvl) {
write_customdata(wd, lvl->totvert, &mesh->mr->vdata);
writedata(wd, DATA, sizeof(short)*lvl->totedge, mesh->mr->edge_flags);
}
for(; lvl; lvl= lvl->next) {
writestruct(wd, DATA, "MultiresLevel", 1, lvl);
writestruct(wd, DATA, "MVert", lvl->totvert, lvl->verts);