diff --git a/release/scripts/sysinfo.py b/release/scripts/sysinfo.py index 736eb78a961..6e05d5b2d35 100644 --- a/release/scripts/sysinfo.py +++ b/release/scripts/sysinfo.py @@ -1,8 +1,8 @@ #!BPY """ -Name: 'System Info' +Name: 'System Information...' Blender: 233 -Group: 'Utils' +Group: 'Help' Tooltip: 'Information about your Blender environment, useful to diagnose problems.' """ @@ -144,5 +144,5 @@ if (warnings): output.write(", documented in the text above.") else: output.write("\n==\nNo problems were found.") -exitmsg = "Done!|Please check the text %s at the Text Editor window." % output.name +exitmsg = "Done!|Please check the text %s in the Text Editor window." % output.name Blender.Draw.PupMenu(exitmsg) diff --git a/source/blender/python/BPY_menus.c b/source/blender/python/BPY_menus.c index f43b5852a32..5b5d4269df8 100644 --- a/source/blender/python/BPY_menus.c +++ b/source/blender/python/BPY_menus.c @@ -77,6 +77,7 @@ static int bpymenu_group_atoi (char *str) { if (!strcmp(str, "Import")) return PYMENU_IMPORT; else if (!strcmp(str, "Export")) return PYMENU_EXPORT; + else if (!strcmp(str, "Help")) return PYMENU_HELP; else if (!strcmp(str, "Generators")) return PYMENU_GENERATORS; else if (!strcmp(str, "Modifiers")) return PYMENU_MODIFIERS; else if (!strcmp(str, "Wizards")) return PYMENU_WIZARDS; @@ -101,6 +102,9 @@ char *BPyMenu_group_itoa (short menugroup) case PYMENU_GENERATORS: return "Generators"; break; + case PYMENU_HELP: + return "Help"; + break; case PYMENU_MODIFIERS: return "Modifiers"; break; @@ -115,10 +119,13 @@ char *BPyMenu_group_itoa (short menugroup) break; case PYMENU_UV: return "UV"; + break; case PYMENU_UTILS: return "Utils"; + break; case PYMENU_TOOLS: return "Tools"; + break; case PYMENU_MISC: return "Misc"; break; diff --git a/source/blender/python/BPY_menus.h b/source/blender/python/BPY_menus.h index 20e10b06d54..d572371bdfc 100644 --- a/source/blender/python/BPY_menus.h +++ b/source/blender/python/BPY_menus.h @@ -84,6 +84,7 @@ typedef enum { PYMENU_MODIFIERS, /* modifies existing obj *data* */ PYMENU_MISC, PYMENU_MATERIALS, + PYMENU_HELP, /* inserted in the info header 'Help' menu */ PYMENU_GENERATORS, /* creates new objects */ PYMENU_IMPORT, PYMENU_EXPORT, diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 2191f9ec933..49b87cf7f66 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -1590,11 +1590,24 @@ static uiBlock *info_help_websitesmenu(void *arg_unused) static void do_info_helpmenu(void *arg, int event) { - switch(event) { - - case 0: + + extern int BPY_menu_do_python(short menutype, int event); // BPY_interface.c + ScrArea *sa; + + if(curarea->spacetype==SPACE_INFO) { + sa= find_biggest_area_of_type(SPACE_SCRIPT); + if (!sa) sa= closest_bigger_area(); + areawinset(sa->win); + } + + /* events >=2 are registered bpython scripts */ + if (event >= 2) BPY_menu_do_python(PYMENU_HELP, event - 2); + + else switch(event) { + + case 0: /* About Blender */ break; - case 1: + case 1: /* Benchmark */ /* dodgy hack turning on CTRL ALT SHIFT key to do a benchmark * rather than copying lines and lines of code from toets.c :( */ @@ -1612,6 +1625,7 @@ static void do_info_helpmenu(void *arg, int event) } break; } + allqueue(REDRAWINFO, 0); } @@ -1621,6 +1635,8 @@ static uiBlock *info_helpmenu(void *arg_unused) uiBlock *block; short yco= 0; short menuwidth=120; + BPyMenu *pym; + int i = 0; block= uiNewBlock(&curarea->uiblocks, "info_helpmenu", UI_EMBOSSP, UI_HELV, curarea->headwin); uiBlockSetButmFunc(block, do_info_helpmenu, NULL); @@ -1649,6 +1665,13 @@ static uiBlock *info_helpmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Release Notes *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); */ + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + for (pym = BPyMenuTable[PYMENU_HELP]; pym; pym = pym->next, i++) { + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, pym->name, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, i+2, pym->tooltip?pym->tooltip:pym->filename); + } + uiBlockSetDirection(block, UI_DOWN); uiTextBoundsBlock(block, 80);