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) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to