[Bf-blender-cvs] [fcb430afbaa] blender2.8: Rename OUTLINER_OT_collection_object_remove > _object_remove_from_collection

Dalai Felinto noreply at git.blender.org
Tue Feb 6 21:41:21 CET 2018


Commit: fcb430afbaa6857b59ec4700a1d656f553e8817b
Author: Dalai Felinto
Date:   Tue Feb 6 13:28:37 2018 -0200
Branches: blender2.8
https://developer.blender.org/rBfcb430afbaa6857b59ec4700a1d656f553e8817b

Rename OUTLINER_OT_collection_object_remove > _object_remove_from_collection

Better make it clear it is different than OUTLINER_OT_collection_objects_remove.

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

M	release/scripts/startup/bl_ui/space_outliner.py
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/space_outliner/outliner_intern.h
M	source/blender/editors/space_outliner/outliner_ops.c

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

diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index c2e494779ec..b0cdc101c6b 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -235,7 +235,7 @@ class OUTLINER_MT_context_object(Menu):
         layout.operator("outliner.object_operation", text="Remap Users").type='REMAP'
         layout.operator("outliner.object_operation", text="Rename").type='RENAME'
         layout.separator()
-        layout.operator("outliner.collection_object_remove", text="Remove from Collection")
+        layout.operator("outliner.object_remove_from_collection", text="Remove from Collection")
 
 
 classes = (
diff --git a/source/blender/editors/space_outliner/outliner_collections.c b/source/blender/editors/space_outliner/outliner_collections.c
index 6897c6a1f83..14e27bcafa9 100644
--- a/source/blender/editors/space_outliner/outliner_collections.c
+++ b/source/blender/editors/space_outliner/outliner_collections.c
@@ -564,7 +564,7 @@ void OUTLINER_OT_collection_objects_remove(wmOperatorType *ot)
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
-static int collection_object_remove_poll(bContext *C)
+static int object_collection_remove_poll(bContext *C)
 {
 	SpaceOops *so = CTX_wm_space_outliner(C);
 	if (so == NULL) {
@@ -580,7 +580,7 @@ static int collection_object_remove_poll(bContext *C)
 	return ELEM(so->outlinevis, SO_VIEW_LAYER, SO_COLLECTIONS, SO_GROUPS);
 }
 
-static int collection_object_remove_exec(bContext *C, wmOperator *UNUSED(op))
+static int object_collection_remove_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	SpaceOops *soops = CTX_wm_space_outliner(C);
 	Main *bmain = CTX_data_main(C);
@@ -623,16 +623,16 @@ static int collection_object_remove_exec(bContext *C, wmOperator *UNUSED(op))
 	return OPERATOR_FINISHED;
 }
 
-void OUTLINER_OT_collection_object_remove(wmOperatorType *ot)
+void OUTLINER_OT_object_remove_from_collection(wmOperatorType *ot)
 {
 	/* identifiers */
 	ot->name = "Remove Object from Collection";
-	ot->idname = "OUTLINER_OT_collection_object_remove";
+	ot->idname = "OUTLINER_OT_object_remove_from_collection";
 	ot->description = "Remove selected objects from their respective collection";
 
 	/* api callbacks */
-	ot->exec = collection_object_remove_exec;
-	ot->poll = collection_object_remove_poll;
+	ot->exec = object_collection_remove_exec;
+	ot->poll = object_collection_remove_poll;
 
 	/* flags */
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 25dcda8f959..78ed6b07571 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -354,9 +354,9 @@ void OUTLINER_OT_collection_link(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_unlink(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_new(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_duplicate(struct wmOperatorType *ot);
-void OUTLINER_OT_collection_object_remove(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_objects_remove(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_objects_select(struct wmOperatorType *ot);
+void OUTLINER_OT_object_remove_from_collection(struct wmOperatorType *ot);
 
 void OUTLINER_OT_collection_objects_add(struct wmOperatorType *ot);
 void OUTLINER_OT_collection_nested_new(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c
index 0734c3f9701..cddd6ff22cb 100644
--- a/source/blender/editors/space_outliner/outliner_ops.c
+++ b/source/blender/editors/space_outliner/outliner_ops.c
@@ -479,9 +479,9 @@ void outliner_operatortypes(void)
 	WM_operatortype_append(OUTLINER_OT_collection_nested_new);
 	WM_operatortype_append(OUTLINER_OT_collection_delete_selected);
 	WM_operatortype_append(OUTLINER_OT_collection_objects_add);
-	WM_operatortype_append(OUTLINER_OT_collection_object_remove);
 	WM_operatortype_append(OUTLINER_OT_collection_objects_remove);
 	WM_operatortype_append(OUTLINER_OT_collection_objects_select);
+	WM_operatortype_append(OUTLINER_OT_object_remove_from_collection);
 }
 
 static wmKeyMap *outliner_item_drag_drop_modal_keymap(wmKeyConfig *keyconf)



More information about the Bf-blender-cvs mailing list