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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2010-07-27 10:06:36 +0400
committerJoshua Leung <aligorith@gmail.com>2010-07-27 10:06:36 +0400
commitc3ef9c16b9bf3f15da18065439f41b2f22a85ad3 (patch)
tree70958550c1a3f8568123e32182a8d74d7c3b3b0d /source
parenta3166d2997e2e3f111ea4ca9d9f1f26039215406 (diff)
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
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/blenloader/intern/writefile.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 3514eb91dd5..71a9fc2e844 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -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]);
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index bee1b0a5388..eab6a4c2b55 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -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);