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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-10 17:26:06 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-10 17:26:06 +0300
commitacadb8c39f83a4b4112c8c77bac1eb39584ad100 (patch)
tree6e6249a3b1a8ef81bf74efb4dacfb2be8fa37c24 /source/blender/blenloader/intern/writefile.c
parent6639ba6b867581ece49423f2c92651727fd4552f (diff)
Sculpt Branch:
Revised external multires file saving. Now it is more manual in that you have to specify where to save it, like an image file, but still saved at the same time as the .blend. It would ideally be automatic, but this is difficult to implement, so for now this should at least be more reliable.
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r--source/blender/blenloader/intern/writefile.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index bc0db6d4cd1..280b9ffc182 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1457,13 +1457,13 @@ static void write_mdisps(WriteData *wd, int count, MDisps *mdlist, int external)
}
}
-static void write_customdata(WriteData *wd, int count, CustomData *data, int partial_type, int partial_count)
+static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data, int partial_type, int partial_count)
{
int i;
- /* write external customdata */
+ /* write external customdata (not for undo) */
if(data->external && !wd->current)
- CustomData_external_write(data, CD_MASK_MESH, count, 0);
+ CustomData_external_write(data, id, CD_MASK_MESH, count, 0);
writestruct(wd, DATA, "CustomDataLayer", data->maxlayer, data->layers);
@@ -1515,16 +1515,16 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);
if(mesh->pv) {
- write_customdata(wd, mesh->pv->totvert, &mesh->vdata, -1, 0);
- write_customdata(wd, mesh->pv->totedge, &mesh->edata,
+ write_customdata(wd, &mesh->id, mesh->pv->totvert, &mesh->vdata, -1, 0);
+ write_customdata(wd, &mesh->id, mesh->pv->totedge, &mesh->edata,
CD_MEDGE, mesh->totedge);
- write_customdata(wd, mesh->pv->totface, &mesh->fdata,
+ write_customdata(wd, &mesh->id, mesh->pv->totface, &mesh->fdata,
CD_MFACE, mesh->totface);
}
else {
- write_customdata(wd, mesh->totvert, &mesh->vdata, -1, 0);
- write_customdata(wd, mesh->totedge, &mesh->edata, -1, 0);
- write_customdata(wd, mesh->totface, &mesh->fdata, -1, 0);
+ write_customdata(wd, &mesh->id, mesh->totvert, &mesh->vdata, -1, 0);
+ write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0);
+ write_customdata(wd, &mesh->id, mesh->totface, &mesh->fdata, -1, 0);
}
/* PMV data */