diff options
author | Mateusz Grzeliński <grzelinskimat@gmail.com> | 2020-08-14 10:46:56 +0300 |
---|---|---|
committer | Mateusz Grzeliński <grzelinskimat@gmail.com> | 2020-08-14 10:46:56 +0300 |
commit | 1a41499b2218efb085c26ec7f47211144b2f43fe (patch) | |
tree | b2ad3132efdd454283c04850f2df7aac1d390033 /release | |
parent | a5b9b6e2ce93c69e7b6e480cc525ab982fc4f889 (diff) |
UI: add separate menu item for clog and report
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_info.py | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index ab5cefd3198..9e03a4337ec 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -52,9 +52,12 @@ class INFO_MT_editor_menus(Menu): def draw(self, context): layout = self.layout layout.menu("INFO_MT_view") - layout.menu("INFO_MT_info") - sinfo = context.space_data + if sinfo.view == 'REPORTS': + layout.menu("INFO_MT_report_info") + else: + layout.menu("INFO_MT_clog_info") + row = layout.row() row.prop(sinfo, "view", expand=True) @@ -68,20 +71,41 @@ class INFO_MT_view(Menu): layout.menu("INFO_MT_area") -class INFO_MT_info(Menu): - bl_label = "Info" +class INFO_MT_clog_info(Menu): + bl_label = "Log" + + def draw(self, _context): + layout = self.layout + + layout.operator("info.clog_select_all", text="Select All").action = 'SELECT' + layout.operator("info.clog_select_all", text="Deselect All").action = 'DESELECT' + layout.operator("info.clog_select_all", text="Invert Selection").action = 'INVERT' + layout.operator("info.clog_select_all", text="Toggle Selection").action = 'TOGGLE' + + layout.separator() + + layout.operator("info.clog_select_box") + + layout.separator() + + layout.operator("info.clog_delete", text="Delete") + layout.operator("info.clog_copy", text="Copy") + + +class INFO_MT_report_info(Menu): + bl_label = "Report" def draw(self, _context): layout = self.layout - layout.operator("info.select_all", text="Select All").action = 'SELECT' - layout.operator("info.select_all", text="Deselect All").action = 'DESELECT' - layout.operator("info.select_all", text="Invert Selection").action = 'INVERT' - layout.operator("info.select_all", text="Toggle Selection").action = 'TOGGLE' + layout.operator("info.report_select_all", text="Select All").action = 'SELECT' + layout.operator("info.report_select_all", text="Deselect All").action = 'DESELECT' + layout.operator("info.report_select_all", text="Invert Selection").action = 'INVERT' + layout.operator("info.report_select_all", text="Toggle Selection").action = 'TOGGLE' layout.separator() - layout.operator("info.select_box") + layout.operator("info.report_select_box") layout.separator() @@ -237,7 +261,8 @@ classes = ( INFO_MT_editor_menus, INFO_MT_area, INFO_MT_view, - INFO_MT_info, + INFO_MT_clog_info, + INFO_MT_report_info, INFO_MT_context_menu, INFO_PT_log_formatting, INFO_PT_report_type_visibility |