diff options
author | Bastien Montagne <bastien@blender.org> | 2021-08-26 16:01:14 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-08-26 16:01:14 +0300 |
commit | edb95b3fcbb907fe4b93fecf9e398f41113b3ee4 (patch) | |
tree | 0f39a4b935d29a170ecaa887496a0a0ef4cae72a /source/blender/blenloader/intern/versioning_280.c | |
parent | 1bb2077250aed65e9445468161e01aa219a89624 (diff) |
Cleanup: Use `ID_IS_LINKED` instead of direct `id.lib` pointer check.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index f77d0361e51..2598c53a5e0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -444,7 +444,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) Collection *collection = BKE_collection_add(bmain, collection_master, name); collection->id.lib = scene->id.lib; - if (collection->id.lib != NULL) { + if (ID_IS_LINKED(collection)) { collection->id.tag |= LIB_TAG_INDIRECT; } collections[layer] = collection; @@ -574,10 +574,10 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) static void do_version_collection_propagate_lib_to_children(Collection *collection) { - if (collection->id.lib != NULL) { + if (ID_IS_LINKED(collection)) { for (CollectionChild *collection_child = collection->children.first; collection_child != NULL; collection_child = collection_child->next) { - if (collection_child->collection->id.lib == NULL) { + if (!ID_IS_LINKED(collection_child->collection)) { collection_child->collection->id.lib = collection->id.lib; } do_version_collection_propagate_lib_to_children(collection_child->collection); |