From e7ea99af1b0d933b9323be39d8b1c6f683bfba52 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 26 Feb 2019 16:15:30 -0300 Subject: Outliner: Collection - Duplicate Hierarchy, and Duplicate Linked Hierarchy As per the suggestion on T57064, this introduces two new options to duplicate collections. We then have: * Duplicate > Collection (New collection with linked content). * Duplicate > Hierachy (Duplicate entire hierarchy and make all contents single user). * Duplicate > Linked Hierarchy (Duplicate entire hierarchy keeping content linked with original). Development TODO: `single_object_users` can/should use the new functions. Reviewers: brecht, mont29 Subscribers: pablovazquez, billreynish, JulienKaspar Differential Revision: https://developer.blender.org/D4394 --- source/blender/blenkernel/BKE_collection.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_collection.h') diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h index 2e4d2a7bf2c..5e6f87e7f97 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -54,11 +54,13 @@ void BKE_collection_free(struct Collection *collection); bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bool hierarchy); struct Collection *BKE_collection_copy(struct Main *bmain, struct Collection *parent, struct Collection *collection); -struct Collection *BKE_collection_copy_master(struct Main *bmain, struct Collection *collection, const int flag); void BKE_collection_copy_data(struct Main *bmain, struct Collection *collection_dst, const struct Collection *collection_src, const int flag); -void BKE_collection_copy_full(struct Main *bmain, struct Collection *collection); void BKE_collection_make_local(struct Main *bmain, struct Collection *collection, const bool lib_local); +struct Collection *BKE_collection_duplicate(struct Main *bmain, struct Collection *parent, struct Collection *collection, const bool do_hierarchy, const bool do_deep_copy); +struct Collection *BKE_collection_copy_master(struct Main *bmain, struct Collection *collection, const int flag); +void BKE_collection_copy_full(struct Main *bmain, struct Collection *collection); + /* Master Collection for Scene */ struct Collection *BKE_collection_master(const struct Scene *scene); -- cgit v1.2.3