diff options
author | Julian Eisel <julian@blender.org> | 2021-10-27 16:50:14 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-10-27 19:51:44 +0300 |
commit | 3e32a68f384d380ea9ce0a0a6fbf47c9ad2a78e4 (patch) | |
tree | 6af026099d52d2bcec91e1f4ed003ce9acd226e4 /source/blender/editors/include | |
parent | bfd2921d38b3ae29999ed5c44558b337661d2705 (diff) |
UI: Refactor how dragging onto text buttons works, fixing issues
There was a bunch of special handling to support dropping data-blocks onto
string or search-menu buttons, to change the value of these. This refactor
makes that case use the normal drop-box design, where an operator is executed
on drop that gets input properties set by the drop-box. This should also make
it easier to add support for dragging assets into these buttons.
In addition this fixes an issue: Two tooltips were shown when dragging assets
over text buttons. None should be shown, because this isn't supported.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 39d70f15a3a..725c9921d13 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -788,7 +788,8 @@ void UI_but_drag_set_value(uiBut *but); void UI_but_drag_set_image( uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free); -bool UI_but_active_drop_name(struct bContext *C); +uiBut *UI_but_active_drop_name_button(const struct bContext *C); +bool UI_but_active_drop_name(const struct bContext *C); bool UI_but_active_drop_color(struct bContext *C); void UI_but_flag_enable(uiBut *but, int flag); |