diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-04 19:37:19 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-05 12:53:11 +0300 |
commit | 72724211df13a3e2b93839511be44e7b5f72a190 (patch) | |
tree | f03b5fb25557dbe769a14febf67ce340c2d58b3c | |
parent | b26c9dfcb2ef19054f23cceb9988e8a8cce24b12 (diff) |
BKE_library: add 'no preview' flag to LIB_ID_COPY_LOCALIZE.
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...
-rw-r--r-- | source/blender/blenkernel/BKE_library.h | 3 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 0438ac95ce2..6166760fd30 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -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, }; diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 78b3776455f..ff3128a2fb6 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -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) { |