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/editors/space_outliner
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/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 36b2966dc43..11ad3abcd54 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -868,7 +868,8 @@ static bool datastack_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
static char *datastack_drop_tooltip(bContext *UNUSED(C),
wmDrag *drag,
- const wmEvent *UNUSED(event))
+ const wmEvent *UNUSED(event),
+ struct wmDropBox *UNUSED(drop))
{
StackDropData *drop_data = drag->poin;
switch (drop_data->drop_action) {
@@ -1191,7 +1192,10 @@ static bool collection_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event
return false;
}
-static char *collection_drop_tooltip(bContext *C, wmDrag *drag, const wmEvent *event)
+static char *collection_drop_tooltip(bContext *C,
+ wmDrag *drag,
+ const wmEvent *event,
+ wmDropBox *UNUSED(drop))
{
CollectionDrop data;
if (!event->shift && collection_drop_init(C, drag, event, &data)) {