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>2020-10-07 17:13:01 +0300
committerBastien Montagne <bastien@blender.org>2020-10-07 19:05:06 +0300
commit03ef0cfe3c3327647be5289d8ecddea820401221 (patch)
treea761b84e34ca5e11a133fa393261f151249cf517 /source/blender/editors/object/object_relations.c
parent7c9131d11eb01a70db440fac7bb3f4b3833d544a (diff)
Refactor `BKE_id_copy` to return the new ID pointer.
No reasons to keep the new ID pointer as parameter here. Part of T71219.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index e08a9148f15..1cc762dfb65 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1819,8 +1819,7 @@ static Collection *single_object_users_collection(Main *bmain,
/* Generate new copies for objects in given collection and all its children,
* and optionally also copy collections themselves. */
if (copy_collections && !is_master_collection) {
- Collection *collection_new;
- BKE_id_copy(bmain, &collection->id, (ID **)&collection_new);
+ Collection *collection_new = (Collection *)BKE_id_copy(bmain, &collection->id);
id_us_min(&collection_new->id);
collection = ID_NEW_SET(collection, collection_new);
}