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:
authorDalai Felinto <dfelinto@gmail.com>2019-03-01 17:43:30 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-03-01 17:44:19 +0300
commit7d4e1ac727f3cd697d137935a9dbd30d5cfe5192 (patch)
treead7bde7d7e0c104b4ab4bf908f98c93bba59051c /source/blender/editors/space_outliner
parente7ea99af1b0d933b9323be39d8b1c6f683bfba52 (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')
-rw-r--r--source/blender/editors/space_outliner/outliner_collections.c28
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h3
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.c3
3 files changed, 8 insertions, 26 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;
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index a1751e90660..0e215c595c1 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -316,8 +316,7 @@ struct Collection *outliner_collection_from_tree_element(const TreeElement *te);
void OUTLINER_OT_collection_new(struct wmOperatorType *ot);
void OUTLINER_OT_collection_duplicate(struct wmOperatorType *ot);
-void OUTLINER_OT_collection_duplicate_hierarchy(struct wmOperatorType *ot);
-void OUTLINER_OT_collection_duplicate_linked_hierarchy(struct wmOperatorType *ot);
+void OUTLINER_OT_collection_duplicate_linked(struct wmOperatorType *ot);
void OUTLINER_OT_collection_delete(struct wmOperatorType *ot);
void OUTLINER_OT_collection_objects_select(struct wmOperatorType *ot);
void OUTLINER_OT_collection_objects_deselect(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 404ad17ba4e..eea06fc0b0c 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -94,8 +94,7 @@ void outliner_operatortypes(void)
/* collections */
WM_operatortype_append(OUTLINER_OT_collection_new);
WM_operatortype_append(OUTLINER_OT_collection_duplicate);
- WM_operatortype_append(OUTLINER_OT_collection_duplicate_hierarchy);
- WM_operatortype_append(OUTLINER_OT_collection_duplicate_linked_hierarchy);
+ WM_operatortype_append(OUTLINER_OT_collection_duplicate_linked);
WM_operatortype_append(OUTLINER_OT_collection_delete);
WM_operatortype_append(OUTLINER_OT_collection_objects_select);
WM_operatortype_append(OUTLINER_OT_collection_objects_deselect);