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:
authorCampbell Barton <ideasman42@gmail.com>2020-03-24 06:04:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-24 06:11:31 +0300
commit15b0c764808da1dec122c13849340ea84ff69716 (patch)
tree6206b8ab9373503833991e29942857aecd8c2c76
parentc46dcdf8871e7404516a234087cfc4bf4e2794d0 (diff)
UI: add Blender -> System menu
Include technical operators here so they're available when using menu-search.
-rw-r--r--release/scripts/startup/bl_ui/space_topbar.py25
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
2 files changed, 26 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 7ffb61fef5a..40824cbeb52 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -243,6 +243,10 @@ class TOPBAR_MT_app(Menu):
layout.operator("preferences.app_template_install",
text="Install Application Template...")
+ layout.separator()
+
+ layout.menu("TOPBAR_MT_app_system")
+
class TOPBAR_MT_file_cleanup(Menu):
bl_label = "Clean Up"
@@ -442,6 +446,26 @@ class TOPBAR_MT_app_support(Menu):
).url = "https://store.blender.org"
+# Include technical operators here which would otherwise have no way for users to access.
+class TOPBAR_MT_app_system(Menu):
+ bl_label = "System"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("script.reload")
+
+ layout.separator()
+
+ layout.operator("wm.memory_statistics")
+ layout.operator("wm.debug_menu")
+ layout.operator_menu_enum("wm.redraw_timer", "type")
+
+ layout.separator()
+
+ layout.operator("screen.spacedata_cleanup")
+
+
class TOPBAR_MT_templates_more(Menu):
bl_label = "Templates"
@@ -828,6 +852,7 @@ classes = (
TOPBAR_MT_editor_menus,
TOPBAR_MT_app,
TOPBAR_MT_app_about,
+ TOPBAR_MT_app_system,
TOPBAR_MT_app_support,
TOPBAR_MT_file,
TOPBAR_MT_file_new,
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 2ae71eb2490..853da714f76 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1675,7 +1675,7 @@ static int wm_operator_defaults_exec(bContext *C, wmOperator *op)
/* used by operator preset menu. pre-2.65 this was a 'Reset' button */
static void WM_OT_operator_defaults(wmOperatorType *ot)
{
- ot->name = "Restore Defaults";
+ ot->name = "Restore Operator Defaults";
ot->idname = "WM_OT_operator_defaults";
ot->description = "Set the active operator to its default values";