Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-08-04 09:58:19 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-04 09:58:39 +0300
commiteffc0487106bc74590acf35a61541597b1149daa (patch)
tree893cd6d82930879d3e0e2734ce66243f4042f72d /source/blender/windowmanager/intern/wm_dragdrop.c
parentcd92b2350fc20f6c91128881b5fd20dd173d2308 (diff)
T90371: Asset: Drop Material Tooltip.
This patch changes the drop named material tooltip to give feedback to the user what is going to happen when they invoke the change. There are 3 states: * "": Operator will be canceled as not all data is present (dropping on background.) * "Drop <named material> on <object name> (slot <slot number>, replacing <current material in slot>). * "Drop <named material> on <object name> (slot <slot number). Reviewed By: Severin Maniphest Tasks: T90371 Differential Revision: https://developer.blender.org/D12106
Diffstat (limited to 'source/blender/windowmanager/intern/wm_dragdrop.c')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index c58d3c53e03..dcbb502117e 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -220,14 +220,11 @@ void WM_drag_free_list(struct ListBase *lb)
}
}
-static char *dropbox_tooltip(bContext *C,
- wmDrag *drag,
- const wmEvent *event,
- const wmDropBox *drop)
+static char *dropbox_tooltip(bContext *C, wmDrag *drag, const wmEvent *event, wmDropBox *drop)
{
char *tooltip = NULL;
if (drop->tooltip) {
- tooltip = drop->tooltip(C, drag, event);
+ tooltip = drop->tooltip(C, drag, event, drop);
}
if (!tooltip) {
tooltip = BLI_strdup(WM_operatortype_name(drop->ot, drop->ptr));