diff options
author | Julian Eisel <julian@blender.org> | 2021-03-24 16:05:57 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-03-24 16:28:25 +0300 |
commit | d37deb19bebffcd2abae6c409a2c135adf08f0cd (patch) | |
tree | 112e9b7a67960040363c9d6a2fb8cd8f787f5880 /source/blender/editors/interface/interface_intern.h | |
parent | 781f41f633fc61033423ebae657c0495ab9d131b (diff) |
Cleanup: Move button context based operator poll into utility function
Using the button context for operators is useful for other cases as well (where
the operator isn't the button operator itself). For example we'll need this for
the asset view UI template, where there will be additional operators that
should be able to act on button context.
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 1d4a44e0c76..d9cfe97a3eb 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -647,6 +647,8 @@ extern bool ui_but_menu_draw_as_popover(const uiBut *but); void ui_but_range_set_hard(uiBut *but); void ui_but_range_set_soft(uiBut *but); +bool ui_but_context_poll_operator(struct bContext *C, struct wmOperatorType *ot, const uiBut *but); + extern void ui_but_update(uiBut *but); extern void ui_but_update_edited(uiBut *but); extern bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT; |