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/blenkernel/intern/object.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/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 16ac027fb34..676277dae8c 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1790,8 +1790,7 @@ void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src)
*/
Object *BKE_object_copy(Main *bmain, const Object *ob)
{
- Object *ob_copy;
- BKE_id_copy(bmain, &ob->id, (ID **)&ob_copy);
+ Object *ob_copy = (Object *)BKE_id_copy(bmain, &ob->id);
/* We increase object user count when linking to Collections. */
id_us_min(&ob_copy->id);
@@ -1829,8 +1828,7 @@ Object *BKE_object_duplicate(Main *bmain,
Material ***matarar;
- Object *obn;
- BKE_id_copy(bmain, &ob->id, (ID **)&obn);
+ Object *obn = (Object *)BKE_id_copy(bmain, &ob->id);
id_us_min(&obn->id);
if (is_subprocess) {
ID_NEW_SET(ob, obn);