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:
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 */