Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2018-10-19 15:30:39 +0300
committerJacques Lucke <mail@jlucke.com>2018-10-19 15:30:39 +0300
commitc17f2c2eb61f387c278a8dbc8ec559fc1d4bcad6 (patch)
treec4f141eca9becb078524bf5081088ca4c6b23554 /source/blender/blenkernel/intern/collection.c
parentbdd02cc082e5f16935f2ed9fbafe63f8aed2822a (diff)
Outliner: Open empty collection when something is dragged into it
Reviewers: brecht Differential Revision: https://developer.blender.org/D3814
Diffstat (limited to 'source/blender/blenkernel/intern/collection.c')
-rw-r--r--source/blender/blenkernel/intern/collection.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index ef126da3463..54ce5223756 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -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)