[Bf-blender-cvs] [f927f388f66] blender2.8: Fix T57288: Assert when deleting duplicated collection (id->us == 0).
Bastien Montagne
noreply at git.blender.org
Tue Oct 23 12:02:45 CEST 2018
Commit: f927f388f6608cb802b489907ef0c280607d900c
Author: Bastien Montagne
Date: Tue Oct 23 11:59:53 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf927f388f6608cb802b489907ef0c280607d900c
Fix T57288: Assert when deleting duplicated collection (id->us == 0).
Copying an ID also add a default user to new one (just like creating an
ID), by default...
===================================================================
M source/blender/blenkernel/intern/collection.c
===================================================================
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 54ce5223756..ece79fe4b37 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -231,6 +231,7 @@ Collection *BKE_collection_copy(Main *bmain, Collection *parent, Collection *col
Collection *collection_new;
BKE_id_copy_ex(bmain, &collection->id, (ID **)&collection_new, 0, false);
+ id_us_min(collection_new); /* Copying add one user by default, need to get rid of that one. */
/* Optionally add to parent. */
if (parent) {
More information about the Bf-blender-cvs
mailing list