Commit: d2c150772a432091ac128e0fc01aef3b997e8bfb
Author: Bastien Montagne
Date: Tue Aug 11 18:46:47 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBd2c150772a432091ac128e0fc01aef3b997e8bfb
Fix T79692: Full copy of scene makes Blender freeze if there is content
directly in the master collection.
Old and new collections are the same data in Master collection case
here, so we cannot consider the `gobject` listbase of `collection_old`
as always immutable.
===================================================================
M source/blender/blenkernel/intern/collection.c
===================================================================
diff --git a/source/blender/blenkernel/intern/collection.c
b/source/blender/blenkernel/intern/collection.c
index 6118325c231..5c618c8e9ce 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -408,9 +408,9 @@ static Collection *collection_duplicate_recursive(Main
*bmain,
}
if (do_objects) {
- /* We can loop on collection_old's objects, that list is currently
identical the collection_new
- * objects, and won't be changed here. */
- LISTBASE_FOREACH (CollectionObject *, cob, &collection_old->gobject) {
+ /* We can loop on collection_old's objects, but have to consider it
mutable because with master
+ * collections collection_old and collection_new are the same data here. */
+ LISTBASE_FOREACH_MUTABLE (CollectionObject *, cob,
&collection_old->gobject) {
Object *ob_old = cob->ob;
Object *ob_new = (Object *)ob_old->id.newid;
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs