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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user