From b9aa2acecdc9b9829d190252a4ca7ad8cf5ce0cc Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 20 May 2020 18:43:25 +0200 Subject: Refactor: Move collection foreach_id to new IDTypeInfo structure. --- source/blender/blenkernel/intern/lib_query.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'source/blender/blenkernel/intern/lib_query.c') diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c index 66c04a75db6..753612eb0ab 100644 --- a/source/blender/blenkernel/intern/lib_query.c +++ b/source/blender/blenkernel/intern/lib_query.c @@ -786,24 +786,7 @@ static void library_foreach_ID_link(Main *bmain, } case ID_GR: { - Collection *collection = (Collection *)id; - - LISTBASE_FOREACH (CollectionObject *, cob, &collection->gobject) { - FOREACH_CALLBACK_INVOKE(&data, cob->ob, IDWALK_CB_USER); - } - LISTBASE_FOREACH (CollectionChild *, child, &collection->children) { - FOREACH_CALLBACK_INVOKE(&data, child->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_USER); - } - LISTBASE_FOREACH (CollectionParent *, parent, &collection->parents) { - /* XXX This is very weak. The whole idea of keeping pointers to private IDs is very bad - * anyway... */ - const int cb_flag = ((parent->collection != NULL && - (parent->collection->id.flag & LIB_EMBEDDED_DATA) != 0) ? - IDWALK_CB_EMBEDDED : - IDWALK_CB_NOP); - FOREACH_CALLBACK_INVOKE( - &data, parent->collection, IDWALK_CB_NEVER_SELF | IDWALK_CB_LOOPBACK | cb_flag); - } + BLI_assert(0); break; } -- cgit v1.2.3