Refactor: allow event handlers to have a poll function
Previously only a fixed bounding box could be used. This was not flexible enough. T63193 will benefit from this refactor. Reviewers: brecht, campbellbarton
This commit is contained in:
@@ -116,7 +116,7 @@ static void script_main_region_init(wmWindowManager *wm, ARegion *ar)
|
||||
|
||||
/* own keymap */
|
||||
keymap = WM_keymap_ensure(wm->defaultconf, "Script", SPACE_SCRIPT, 0);
|
||||
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
|
||||
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
||||
}
|
||||
|
||||
static void script_main_region_draw(const bContext *C, ARegion *ar)
|
||||
|
||||
Reference in New Issue
Block a user