Bugfix #23000: AnimData on Meshes not saved (and loaded)

* Animation data for meshes wasn't getting saved at all (the linked actions were, but that doesn't really count)
* Lib-linked actions from other files may not load correctly too
This commit is contained in:
2010-07-27 06:06:36 +00:00
parent a3166d2997
commit c3ef9c16b9
2 changed files with 5 additions and 0 deletions

View File

@@ -3298,6 +3298,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
mesh->msticky= newdataadr(fd, mesh->msticky);
mesh->dvert= newdataadr(fd, mesh->dvert);
/* animdata */
mesh->adt= newdataadr(fd, mesh->adt);
direct_link_animdata(fd, mesh->adt);
@@ -11681,6 +11682,9 @@ static void expand_mesh(FileData *fd, Main *mainvar, Mesh *me)
TFace *tf;
int a, i;
if(me->adt)
expand_animdata(fd, mainvar, me->adt);
for(a=0; a<me->totcol; a++) {
expand_doit(fd, mainvar, me->mat[a]);
}

View File

@@ -1538,6 +1538,7 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
/* direct data */
if (mesh->id.properties) IDP_WriteProperty(mesh->id.properties, wd);
if (mesh->adt) write_animdata(wd, mesh->adt);
writedata(wd, DATA, sizeof(void *)*mesh->totcol, mesh->mat);