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@gmail.com>2018-05-18 20:31:35 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-22 15:17:51 +0300
commit0d2aa1a7bb2048dcb81bddcbb620cdd4f023faf8 (patch)
tree77a5d5b2eb1c05a94746cc083d3fd852f2b14c32 /source/blender/blenloader
parentf99197fb2d0a529cd2096c9367bc30d24398ac1e (diff)
Cleanup: make group/collection versioning a bit more clear.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
-rw-r--r--source/blender/blenloader/intern/versioning_280.c1
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 35b699f29b8..a8181f1e043 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5679,16 +5679,14 @@ static void direct_link_collection(FileData *fd, Collection *collection)
#ifdef USE_COLLECTION_COMPAT_28
/* This runs before the very first doversion. */
+ collection->collection = newdataadr(fd, collection->collection);
if (collection->collection != NULL) {
- collection->collection = newdataadr(fd, collection->collection);
direct_link_scene_collection(fd, collection->collection);
}
+ collection->view_layer = newdataadr(fd, collection->view_layer);
if (collection->view_layer != NULL) {
- collection->view_layer = newdataadr(fd, collection->view_layer);
- if (collection->view_layer != NULL) {
- direct_link_view_layer(fd, collection->view_layer);
- }
+ direct_link_view_layer(fd, collection->view_layer);
}
#endif
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 86c8da91251..63fe9642ee7 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -297,6 +297,7 @@ static void do_version_group_collection_to_collection(Main *bmain, Collection *g
}
group->collection = NULL;
+ group->view_layer = NULL;
id_fake_user_set(&group->id);
}