[Bf-blender-cvs] [b28a74746b9] blender2.8: UI: Show development entries in context menu when Dev. Extras is enabled
Pablo Vazquez
noreply at git.blender.org
Wed Aug 22 16:29:51 CEST 2018
Commit: b28a74746b94026365d1c30a21454c933450187a
Author: Pablo Vazquez
Date: Wed Aug 22 16:29:41 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb28a74746b94026365d1c30a21454c933450187a
UI: Show development entries in context menu when Dev. Extras is enabled
===================================================================
M source/blender/editors/interface/interface_context_menu.c
===================================================================
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index d00ab70562c..113c28f05e1 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -731,11 +731,13 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
uiItemO(layout, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Manual"),
ICON_URL, "WM_OT_doc_view_manual_ui_context");
- uiItemFullO(
- layout, "WM_OT_doc_view",
- CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"),
- ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &ptr_props);
- RNA_string_set(&ptr_props, "doc_id", buf);
+ if (U.flag & USER_DEVELOPER_UI) {
+ uiItemFullO(
+ layout, "WM_OT_doc_view",
+ CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Online Python Reference"),
+ ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &ptr_props);
+ RNA_string_set(&ptr_props, "doc_id", buf);
+ }
/* XXX inactive option, not for public! */
#if 0
@@ -748,7 +750,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
}
}
- if (but->optype) {
+ if (but->optype && U.flag & USER_DEVELOPER_UI) {
uiItemO(layout, NULL,
ICON_NONE, "UI_OT_copy_python_command_button");
}
More information about the Bf-blender-cvs
mailing list