Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-05-15 09:53:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-15 10:42:01 +0300
commit6a850f3cc840a574d3b5b5af7b608ae3536f96ec (patch)
tree7427864cc1fa2201619f34da5564f1d4a4181f10 /source/blender/blenkernel/intern/lib_id.c
parentc361f911f9c459364fceea5de5b9d0ea2f91c9e9 (diff)
Fix duplicate ID's being created when appending/linking
This removes grease pencil brush creation/dat-block delete on load, since this causes duplicate data-blocks. Add assert to prevent this happening in the future since the error is isn't obvious.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_id.c')
-rw-r--r--source/blender/blenkernel/intern/lib_id.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c
index e976d59ce16..cd10d8b1670 100644
--- a/source/blender/blenkernel/intern/lib_id.c
+++ b/source/blender/blenkernel/intern/lib_id.c
@@ -1018,6 +1018,8 @@ void *BKE_libblock_alloc(Main *bmain, short type, const char *name, const int fl
id->us = 1;
}
if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
+ /* Note that 2.8x versioning has tested not to cause conflicts. */
+ BLI_assert(bmain->is_locked_for_linking == false || ELEM(type, ID_WS, ID_GR));
ListBase *lb = which_libbase(bmain, type);
BKE_main_lock(bmain);