Outliner: Open empty collection when something is dragged into it

Reviewers: brecht

Differential Revision: https://developer.blender.org/D3814
This commit is contained in:
2018-10-19 14:30:39 +02:00
parent bdd02cc082
commit c17f2c2eb6
3 changed files with 10 additions and 0 deletions

View File

@@ -467,6 +467,11 @@ Collection *BKE_collection_object_find(Main *bmain, Collection *collection, Obje
return NULL;
}
bool BKE_collection_is_empty(Collection *collection)
{
return BLI_listbase_is_empty(&collection->gobject) && BLI_listbase_is_empty(&collection->children);
}
/********************** Collection Objects *********************/
static bool collection_object_add(Main *bmain, Collection *collection, Object *ob, int flag, const bool add_us)