BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 4 Feb 2019 16:37:19 +0000 (17:37 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 5 Feb 2019 09:53:11 +0000 (10:53 +0100)
No local work copy is expected to need preview data, at least it should
not. Part of copy flags cleanup, done in separate commit in case
something goes wrong here...

source/blender/blenkernel/BKE_library.h
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

index 0438ac95ce261458a8ba097871cdacae0ec2e6b7..6166760fd300e147c9b8e7272fe8d69494a939ce 100644 (file)
@@ -94,7 +94,7 @@ enum {
        LIB_ID_COPY_CACHES             = 1 << 18,
        /* Don't copy id->adt, used by ID datablock localization routines. */
        LIB_ID_COPY_NO_ANIMDATA        = 1 << 19,
-       /* Mesh: Reference CD data layers instead of doing real copy. */
+       /* Mesh: Reference CD data layers instead of doing real copy - USE WITH CAUTION! */
        LIB_ID_COPY_CD_REFERENCE       = 1 << 20,
 
        /* *** XXX Hackish/not-so-nice specific behaviors needed for some corner cases. *** */
@@ -113,6 +113,7 @@ enum {
        LIB_ID_COPY_LOCALIZE           = LIB_ID_CREATE_NO_MAIN |
                                         LIB_ID_CREATE_NO_USER_REFCOUNT |
                                         LIB_ID_CREATE_NO_DEG_TAG |
+                                        LIB_ID_COPY_NO_PREVIEW |
                                         LIB_ID_COPY_CACHES,
 };
 
index 78b3776455fbc2144777d14a0a61ae78d1ccafb4..ff3128a2fb695c03a365a7bbc7787a291ae55d87 100644 (file)
@@ -318,10 +318,8 @@ bool scene_copy_inplace_no_main(const Scene *scene, Scene *new_scene)
        bool result = BKE_id_copy_ex(NULL,
                                     id_for_copy,
                                     (ID **)&new_scene,
-                                    LIB_ID_CREATE_NO_MAIN |
-                                    LIB_ID_CREATE_NO_USER_REFCOUNT |
-                                    LIB_ID_CREATE_NO_ALLOCATE |
-                                    LIB_ID_CREATE_NO_DEG_TAG);
+                                    LIB_ID_COPY_LOCALIZE |
+                                    LIB_ID_CREATE_NO_ALLOCATE);
 
 #ifdef NESTED_ID_NASTY_WORKAROUND
        if (result) {