diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-02-26 22:15:30 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-01 17:44:19 +0300 |
commit | e7ea99af1b0d933b9323be39d8b1c6f683bfba52 (patch) | |
tree | 461d23594737af40f62f533dbe357d2264134d1d /source/blender/blenkernel/BKE_collection.h | |
parent | 619c65a4b3372b45a8d6d7317672c48d248104ca (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/BKE_collection.h')
-rw-r--r-- | source/blender/blenkernel/BKE_collection.h | 6 |
1 files changed, 4 insertions, 2 deletions
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); |