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:
authorSebastian Parborg <darkdefende@gmail.com>2022-04-28 13:50:22 +0300
committerSebastian Parborg <darkdefende@gmail.com>2022-04-28 13:55:51 +0300
commit77794b1a7b99bd689d1d9872c61d7990fbad2ce4 (patch)
tree48d0a00d5497cb94aa44a157af6fee2bffe0758f /source/blender/editors/interface
parent16fe767d0090f3ff2b2c45c63cb4a84805991f3a (diff)
VSE: Add precise drag and drop and strip previews
This patch adds the drag and drop strip previews in the VSE. It also adds two new functions to the drag and drop API. 1. "draw_in_view" for callbacks that wants to draw elements in local viewport coordinates 2. "on_drag_start" that can be used for prefetching data only once at the start of the drag. Reviewed By: Julian, Campbell Differential Revision: http://developer.blender.org/D14560
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_dropboxes.cc4
-rw-r--r--source/blender/editors/interface/interface_ops.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_dropboxes.cc b/source/blender/editors/interface/interface_dropboxes.cc
index 2e8708827e7..9d3c1372b15 100644
--- a/source/blender/editors/interface/interface_dropboxes.cc
+++ b/source/blender/editors/interface/interface_dropboxes.cc
@@ -67,7 +67,7 @@ static bool ui_drop_name_poll(struct bContext *C, wmDrag *drag, const wmEvent *U
return UI_but_active_drop_name(C) && (drag->type == WM_DRAG_ID);
}
-static void ui_drop_name_copy(wmDrag *drag, wmDropBox *drop)
+static void ui_drop_name_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
{
const ID *id = WM_drag_get_local_ID(drag, 0);
RNA_string_set(drop->ptr, "string", id->name + 2);
@@ -85,7 +85,7 @@ static bool ui_drop_material_poll(bContext *C, wmDrag *drag, const wmEvent *UNUS
return WM_drag_is_ID_type(drag, ID_MA) && !RNA_pointer_is_null(&mat_slot);
}
-static void ui_drop_material_copy(wmDrag *drag, wmDropBox *drop)
+static void ui_drop_material_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
{
const ID *id = WM_drag_get_local_ID_or_import_from_asset(drag, ID_MA);
RNA_int_set(drop->ptr, "session_uuid", (int)id->session_uuid);
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index 0f4f0ef48ff..5b97a80d513 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -1862,7 +1862,7 @@ bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(
return 0;
}
-void UI_drop_color_copy(wmDrag *drag, wmDropBox *drop)
+void UI_drop_color_copy(bContext *UNUSED(C), wmDrag *drag, wmDropBox *drop)
{
uiDragColorHandle *drag_info = drag->poin;