From a77feabb51470b9cfb71be7f0ea7e774d6591799 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 6 Mar 2019 15:09:16 +0100 Subject: Collection duplication from Outliner: add a 'duplicate hierarchy' operation. Point is, you may want to duplicate your set of collections, but not duplicate all their objects. Some notes: * Am rather skeptical about the practice of using operator name to define behavior of some common exec code. Imho, that should be a single operator with an enum to refine its behavior (@cambpellbarton may also have an opinion here?). Left it as-is for now, because this seems to be used by other operators too in that code. :/ * @dfelinto, @pablovazquez, @billreynish am not so happy with current names, but cannot find really good short ones either... Also, shouldn't we move those into a dedicated `Duplicate` sub-menu? --- source/blender/blenkernel/BKE_collection.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 3ddc28dafdb..0390078fc7f 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -57,7 +57,9 @@ struct Collection *BKE_collection_copy(struct Main *bmain, struct Collection *pa void BKE_collection_copy_data(struct Main *bmain, struct Collection *collection_dst, const struct Collection *collection_src, const int flag); 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_duplicate( + struct Main *bmain, struct Collection *parent, struct Collection *collection, + const bool do_hierarchy, const bool do_objects, const bool do_obdata); struct Collection *BKE_collection_copy_master(struct Main *bmain, struct Collection *collection, const int flag); /* Master Collection for Scene */ -- cgit v1.2.3