diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-03-01 17:43:30 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-01 17:44:19 +0300 |
commit | 7d4e1ac727f3cd697d137935a9dbd30d5cfe5192 (patch) | |
tree | ad7bde7d7e0c104b4ab4bf908f98c93bba59051c /source/blender/editors/space_outliner/outliner_collections.c | |
parent | e7ea99af1b0d933b9323be39d8b1c6f683bfba52 (diff) |
Outliner: Collections Duplicate - remove original duplicate operator
Now that we have better options (duplicate collection and duplicate linked) there is no
longer need for the original dupli operator.
In fact, as it was it was of little use if you ever had nested collections.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_collections.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_collections.c | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c index 61c02d18f8f..750c78d76b9 100644 --- a/source/blender/editors/space_outliner/outliner_collections.c +++ b/source/blender/editors/space_outliner/outliner_collections.c @@ -448,7 +448,6 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); SpaceOutliner *soops = CTX_wm_space_outliner(C); TreeElement *te = outliner_active_collection(C); - bool hierarchy = strstr(op->idname, "hierarchy") != NULL; bool linked = strstr(op->idname, "linked") != NULL; /* Can happen when calling from a key binding. */ @@ -469,7 +468,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op) case SO_SCENES: case SO_VIEW_LAYER: case SO_LIBRARIES: - BKE_collection_duplicate(bmain, parent, collection, hierarchy, !linked); + BKE_collection_duplicate(bmain, parent, collection, true, !linked); break; } @@ -484,7 +483,7 @@ void OUTLINER_OT_collection_duplicate(wmOperatorType *ot) /* identifiers */ ot->name = "Duplicate Collection"; ot->idname = "OUTLINER_OT_collection_duplicate"; - ot->description = "Make a new collection with linked content (collection and objects)"; + ot->description = "Duplicate all objects and collections and make them single user"; /* api callbacks */ ot->exec = collection_duplicate_exec; @@ -494,27 +493,12 @@ void OUTLINER_OT_collection_duplicate(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -void OUTLINER_OT_collection_duplicate_hierarchy(wmOperatorType *ot) +void OUTLINER_OT_collection_duplicate_linked(wmOperatorType *ot) { /* identifiers */ - ot->name = "Duplicate Collection Hierarchy"; - ot->idname = "OUTLINER_OT_collection_duplicate_hierarchy"; - ot->description = "Duplicate entire hierarchy and make all content single user"; - - /* api callbacks */ - ot->exec = collection_duplicate_exec; - ot->poll = ED_outliner_collections_editor_poll; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -} - -void OUTLINER_OT_collection_duplicate_linked_hierarchy(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Duplicate Linked Collection Hierarchy"; - ot->idname = "OUTLINER_OT_collection_duplicate_linked_hierarchy"; - ot->description = "Duplicate entire hierarchy with linked object data"; + ot->name = "Duplicate Linked Collection"; + ot->idname = "OUTLINER_OT_collection_duplicate_linked"; + ot->description = "Duplicate all objects and collections with linked object data"; /* api callbacks */ ot->exec = collection_duplicate_exec; |