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:
authorBastien Montagne <bastien@blender.org>2022-02-03 17:38:51 +0300
committerBastien Montagne <bastien@blender.org>2022-02-03 17:38:51 +0300
commitbcded0a1588dea0934f9a0cb3c4237ecae13c2c2 (patch)
tree6cc6409027b9c971a0864a971f7e5c664bdc6b11 /source/blender/blenkernel/intern
parent5920de9247f2094b88716feca4811b7aa6f60505 (diff)
parent946c70e6a7892985289bf8dfaead8512d33eba79 (diff)
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/collection.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index e6ce4eb9440..79f40c1c888 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -1094,14 +1094,12 @@ static bool collection_object_remove(Main *bmain,
return true;
}
-bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
+bool BKE_collection_object_add_notest(Main *bmain, Collection *collection, Object *ob)
{
- if (ELEM(NULL, collection, ob)) {
+ if (ob == NULL) {
return false;
}
- collection = collection_parent_editable_find_recursive(collection);
-
/* Only case where this pointer can be NULL is when scene itself is linked, this case should
* never be reached. */
BLI_assert(collection != NULL);
@@ -1122,6 +1120,17 @@ bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
return true;
}
+bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
+{
+ if (collection == NULL) {
+ return false;
+ }
+
+ collection = collection_parent_editable_find_recursive(collection);
+
+ return BKE_collection_object_add_notest(bmain, collection, ob);
+}
+
void BKE_collection_object_add_from(Main *bmain, Scene *scene, Object *ob_src, Object *ob_dst)
{
bool is_instantiated = false;