[Bf-blender-cvs] [d5576d3b0fc] master: Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.

Bastien Montagne noreply at git.blender.org
Tue Mar 12 15:48:48 CET 2019


Commit: d5576d3b0fcbc3791abb9ab53ef7677775780ed7
Author: Bastien Montagne
Date:   Tue Mar 12 15:05:11 2019 +0100
Branches: master
https://developer.blender.org/rBd5576d3b0fcbc3791abb9ab53ef7677775780ed7

Cleanup: Outliner's Collection duplicate: don't check for visualization type in exec function.

This has already been ensured by poll callback...

===================================================================

M	source/blender/editors/space_outliner/outliner_collections.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index efb28124e57..f7084399268 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -446,7 +446,6 @@ static TreeElement *outliner_active_collection(bContext *C)
 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);
 	const bool linked = strstr(op->idname, "linked") != NULL;
 
@@ -486,13 +485,7 @@ static int collection_duplicate_exec(bContext *C, wmOperator *op)
 		           "it won't be linked to any view layer");
 	}
 
-	switch (soops->outlinevis) {
-		case SO_SCENES:
-		case SO_VIEW_LAYER:
-		case SO_LIBRARIES:
-			BKE_collection_duplicate(bmain, parent, collection, true, true, !linked);
-			break;
-	}
+	BKE_collection_duplicate(bmain, parent, collection, true, true, !linked);
 
 	DEG_relations_tag_update(bmain);
 	WM_main_add_notifier(NC_SCENE | ND_LAYER, CTX_data_scene(C));



More information about the Bf-blender-cvs mailing list