Commit: 846105d254bf720dc8c1a0f1ffc892af7c25b06e
Author: Bastien Montagne
Date:   Mon Feb 4 20:09:26 2019 +0100
Branches: master
https://developer.blender.org/rB846105d254bf720dc8c1a0f1ffc892af7c25b06e

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...

===================================================================

M       source/blender/blenkernel/intern/library.c

===================================================================

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;
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to