From 32396b316455c5b207b1103f03ddc4c8e81cfd00 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 Jul 2018 08:39:09 +0200 Subject: WM: support for filtering modal keymap items Modal keymap display often shows items which aren't used, add a poll funciton to hide these from the status bar. --- source/blender/makesdna/DNA_windowmanager_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index bd2811d3306..80ad3840a8f 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -331,6 +331,8 @@ typedef struct wmKeyMap { /* runtime */ /** Verify if enabled in the current context, use #WM_keymap_poll instead of direct calls. */ bool (*poll)(struct bContext *); + bool (*poll_modal_item)(const struct wmOperator *op, int value); + /** For modal, #EnumPropertyItem for now. */ const void *modal_items; } wmKeyMap; -- cgit v1.2.3