Any script can now register a unique key combination as part of its bpy header. For a supported space type, the user may press this shortcut to invoke the script.

Space types that are to support shortcuts like this should call BPY_menu_do_shortcut(...) from the event queue read method (See winqreadtextspace in drawtext.c for example)
This commit is contained in:
2008-07-15 07:04:31 +00:00
parent 14c1ed0810
commit dbb61988fd
8 changed files with 349 additions and 10 deletions

View File

@@ -59,6 +59,7 @@ typedef struct BPyMenu {
char *name;
char *filename;
char *tooltip;
unsigned short key, qual; /* Registered shortcut key */
short version; /* Blender version */
int dir; /* 0: default, 1: U.pythondir */
struct BPySubMenu *submenus;