diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-07 15:27:33 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-07 19:05:06 +0300 |
commit | 7c9131d11eb01a70db440fac7bb3f4b3833d544a (patch) | |
tree | c7c495566a3f111c8c495f1daa207292bab9c43a /source/blender/blenkernel/BKE_lib_id.h | |
parent | 1f50beb9f28edd2fe54d97647222ad6ee5808c1c (diff) |
Refactor `BKE_id_copy_ex` to return the new ID pointer.
Note that possibility to pass the new ID pointer as parameter was kept,
as this is needed for some rather specific cases (like in depsgraph/COW,
when copying into already allocated memory).
Part of T71219.
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_id.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lib_id.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index 33ccd20bcff..9b1e2c0d41b 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -238,7 +238,10 @@ bool id_single_user(struct bContext *C, struct PropertyRNA *prop); bool BKE_id_copy_is_allowed(const struct ID *id); bool BKE_id_copy(struct Main *bmain, const struct ID *id, struct ID **newid); -bool BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag); +struct ID *BKE_id_copy_ex(struct Main *bmain, + const struct ID *id, + struct ID **r_newid, + const int flag); struct ID *BKE_id_copy_for_duplicate(struct Main *bmain, struct ID *id, const uint duplicate_flags); |