diff options
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d2542e977e3..8f0c470929e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5679,6 +5679,9 @@ static void direct_link_collection(FileData *fd, Collection *collection) link_list(fd, &collection->gobject); link_list(fd, &collection->children); + collection->adt = newdataadr(fd, collection->adt); + direct_link_animdata(fd, collection->adt); + collection->preview = direct_link_preview_image(fd, collection->preview); collection->flag &= ~COLLECTION_HAS_OBJECT_CACHE; @@ -5733,6 +5736,7 @@ static void lib_link_collection(FileData *fd, Main *main) if (collection->id.tag & LIB_TAG_NEED_LINK) { collection->id.tag &= ~LIB_TAG_NEED_LINK; IDP_LibLinkProperty(collection->id.properties, fd); + lib_link_animdata(fd, &collection->id, collection->adt); #ifdef USE_COLLECTION_COMPAT_28 if (collection->collection) { @@ -9272,6 +9276,10 @@ static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSetting static void expand_collection(FileData *fd, Main *mainvar, Collection *collection) { + if (collection->adt) { + expand_animdata(fd, mainvar, collection->adt); + } + for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) { expand_doit(fd, mainvar, cob->ob); } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index de1699e24b7..e47a5ec2823 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2376,6 +2376,10 @@ static void write_collection(WriteData *wd, Collection *collection) /* write LibData */ writestruct(wd, ID_GR, Collection, 1, collection); write_iddata(wd, &collection->id); + + if (collection->adt) { + write_animdata(wd, collection->adt); + } write_collection_nolib(wd, collection); } |