diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-04 22:09:26 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-05 12:53:16 +0300 |
commit | 846105d254bf720dc8c1a0f1ffc892af7c25b06e (patch) | |
tree | 2f004e808c9edbcb403afaa9a49f22374c447a1a /source | |
parent | 9469ebe1cc394af8b22e888a33edeed682e99741 (diff) |
Cleanup: use LIB_ID_COPY_LOCALIZE in BKE_libblock_copy_for_localize().
This is a slightly more risky commit, as it is very difficult to fathom
all that may happen when localazing IDs. Would not expect any issue
though.
Note that a big TODO remain to refactor fully that ID localization
process (for 'shading IDs'), it's still doing pretty much same thing as
regular out-of-main copies, but the infamous ntree topic makes it
delicate to handle...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 7484ca4d716..13701537a1b 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1408,12 +1408,11 @@ void *BKE_libblock_copy(Main *bmain, const ID *id) return idn; } +/* XXX TODO: get rid of this useless wrapper at some point... */ void *BKE_libblock_copy_for_localize(const ID *id) { ID *idn; - BKE_libblock_copy_ex(NULL, id, &idn, (LIB_ID_CREATE_NO_MAIN | - LIB_ID_CREATE_NO_USER_REFCOUNT | - LIB_ID_COPY_NO_ANIMDATA)); + BKE_libblock_copy_ex(NULL, id, &idn, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA); return idn; } |