diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-07 11:38:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-10 18:53:00 +0300 |
commit | 74016d73dbebd8c8a0e1aed70295d1a09037d7eb (patch) | |
tree | f21c0f5f22452072b2c97a0a11aa70cb18d0bd6f /source/blender/editors/space_view3d/space_view3d.c | |
parent | 9e83283f7312c565e32c68bb544177bbfec7ceb2 (diff) |
WM: drag and drop poll functions can now specify a custom tooltip.
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index eaa6f03c533..62adca6af6b 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -554,7 +554,7 @@ static void view3d_main_region_exit(wmWindowManager *wm, ARegion *ar) } } -static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) { if (drag->type == WM_DRAG_ID) { ID *id = drag->poin; @@ -564,7 +564,7 @@ static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent return 0; } -static bool view3d_collection_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool view3d_collection_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) { if (drag->type == WM_DRAG_ID) { ID *id = drag->poin; @@ -574,7 +574,7 @@ static bool view3d_collection_drop_poll(bContext *UNUSED(C), wmDrag *drag, const return 0; } -static bool view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) { if (drag->type == WM_DRAG_ID) { ID *id = drag->poin; @@ -584,7 +584,7 @@ static bool view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEven return 0; } -static bool view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event)) +static bool view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) { if (drag->type == WM_DRAG_ID) { ID *id = drag->poin; @@ -610,19 +610,19 @@ static bool view3d_ima_bg_is_camera_view(bContext *C) return false; } -static bool view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event) +static bool view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **tooltip) { if (view3d_ima_bg_is_camera_view(C)) { return true; } if (!ED_view3d_give_base_under_cursor(C, event->mval)) { - return view3d_ima_drop_poll(C, drag, event); + return view3d_ima_drop_poll(C, drag, event, tooltip); } return 0; } -static bool view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event) +static bool view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **tooltip) { if (!view3d_ima_bg_is_camera_view(C)) { return true; @@ -634,18 +634,18 @@ static bool view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent if ((base == NULL) || ((base != NULL) && base->object->type == OB_EMPTY)) { - return view3d_ima_drop_poll(C, drag, event); + return view3d_ima_drop_poll(C, drag, event, tooltip); } return 0; } -static bool view3d_ima_mesh_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event) +static bool view3d_ima_mesh_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **tooltip) { Base *base = ED_view3d_give_base_under_cursor(C, event->mval); if (base && base->object->type == OB_MESH) - return view3d_ima_drop_poll(C, drag, event); + return view3d_ima_drop_poll(C, drag, event, tooltip); return 0; } |