diff options
-rw-r--r-- | release/scripts/startup/bl_ui/space_outliner.py | 37 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 2 |
2 files changed, 38 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 8b46ae99b8c..28644428cf8 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -201,6 +201,40 @@ class OUTLINER_MT_context_scene_collection(Menu): layout.operator("outliner.collection_objects_remove", text="Remove Selected", icon='ZOOMOUT') +class OUTLINER_MT_context_object_select(Menu): + bl_label = "Object Operation Select" + + def draw(self, context): + layout = self.layout + + layout.operator("outliner.object_operation", text="Select").type='SELECT' + layout.operator("outliner.object_operation", text="Deselect").type='DESELECT' + layout.operator("outliner.object_operation", text="Select Hierarchy").type='SELECT_HIERARCHY' + + +class OUTLINER_MT_context_object_delete(Menu): + bl_label = "Object Operation Delete" + + def draw(self, context): + layout = self.layout + + layout.operator("outliner.object_operation", text="Delete").type='DELETE' + layout.operator("outliner.object_operation", text="Delete Hierarchy").type='DELETE_HIERARCHY' + + +class OUTLINER_MT_context_object(Menu): + bl_label = "Object" + + def draw(self, context): + layout = self.layout + + layout.menu("OUTLINER_MT_context_object_select", text="Select") + layout.menu("OUTLINER_MT_context_object_delete", text="Delete") + layout.separator() + layout.operator("outliner.object_operation", text="Remap Users").type='REMAP' + layout.operator("outliner.object_operation", text="Rename").type='RENAME' + + classes = ( OUTLINER_HT_header, OUTLINER_MT_editor_menus, @@ -209,6 +243,9 @@ classes = ( OUTLINER_MT_edit_datablocks, OUTLINER_MT_edit_orphan_data, OUTLINER_MT_context_scene_collection, + OUTLINER_MT_context_object, + OUTLINER_MT_context_object_delete, + OUTLINER_MT_context_object_select, ) if __name__ == "__main__": # only for live edit. diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index d50d114ef56..9f0165d1272 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -2048,7 +2048,7 @@ static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOops *soop } } else if (objectlevel) { - WM_operator_name_call(C, "OUTLINER_OT_object_operation", WM_OP_INVOKE_REGION_WIN, NULL); + WM_menu_name_call(C, "OUTLINER_MT_context_object", WM_OP_INVOKE_REGION_WIN); } else if (idlevel) { if (idlevel == -1 || datalevel) { |