[Bf-blender-cvs] [8289fc688b3] blender-v2.83-release: Revert "Fix T77460: Easy to create cyclic dependencies in collections and crash Blender."

Jeroen Bakker noreply at git.blender.org
Thu Jun 25 12:01:40 CEST 2020


Commit: 8289fc688b3eb5bc5b1f641e4b51d32d9daf8a71
Author: Jeroen Bakker
Date:   Thu Jun 25 11:47:39 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rB8289fc688b3eb5bc5b1f641e4b51d32d9daf8a71

Revert "Fix T77460: Easy to create cyclic dependencies in collections and crash Blender."

This reverts commit 293b00beb5df27b4455de743fd0684f0988153b0.

===================================================================

M	source/blender/blenkernel/intern/collection.c

===================================================================

diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index c1218856a1e..583bb39a851 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -969,26 +969,6 @@ void BKE_collections_after_lib_link(Main *bmain)
 
 /********************** Collection Children *******************/
 
-static bool collection_find_instance_recursive(Collection *collection,
-                                               Collection *instance_collection)
-{
-  LISTBASE_FOREACH (CollectionObject *, collection_object, &collection->gobject) {
-    if (collection_object->ob != NULL &&
-        /* Object from a given collection should never instanciate that collection either. */
-        ELEM(collection_object->ob->instance_collection, instance_collection, collection)) {
-      return true;
-    }
-  }
-
-  LISTBASE_FOREACH (CollectionChild *, collection_child, &collection->children) {
-    if (collection_find_instance_recursive(collection_child->collection, instance_collection)) {
-      return true;
-    }
-  }
-
-  return false;
-}
-
 bool BKE_collection_find_cycle(Collection *new_ancestor, Collection *collection)
 {
   if (collection == new_ancestor) {
@@ -1001,9 +981,7 @@ bool BKE_collection_find_cycle(Collection *new_ancestor, Collection *collection)
     }
   }
 
-  /* Find possible objects in collection or its children, that would instanciate the given ancestor
-   * collection (that would also make a fully invalid cycle of dependencies) .*/
-  return collection_find_instance_recursive(collection, new_ancestor);
+  return false;
 }
 
 static CollectionChild *collection_find_child(Collection *parent, Collection *collection)



More information about the Bf-blender-cvs mailing list