writestruct(wd, DATA, structname, datasize, layer->data);
}
- else
+ else {
printf("%s error: layer '%s':%d - can't be written to file\n",
__func__, structname, layer->type);
+ }
}
}
backup_mesh.totface = mesh->totface;
mesh->totface = 0;
/* -- */
+ backup_mesh.fdata = mesh->fdata;
+ memset(&mesh->fdata, 0, sizeof(mesh->fdata));
+ /* -- */
#endif /* USE_BMESH_SAVE_WITHOUT_MFACE */
writestruct(wd, ID_ME, "Mesh", 1, mesh);
mesh->mface = backup_mesh.mface;
/* -- */
mesh->totface = backup_mesh.totface;
+ /* -- */
+ mesh->fdata = backup_mesh.fdata;
#endif /* USE_BMESH_SAVE_WITHOUT_MFACE */
}