VSE: Add drag and drop handler for preview area
For some users, dropping assets into preview area may be more practical due to space constraints or it may be just more intuitive. Reviewed By: ISS Differential Revision: https://developer.blender.org/D13311
This commit is contained in:
parent
b42494cf6b
commit
34370d9fdf
|
@ -486,10 +486,9 @@ static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop)
|
|||
}
|
||||
|
||||
/* This region dropbox definition. */
|
||||
static void sequencer_dropboxes(void)
|
||||
{
|
||||
ListBase *lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW);
|
||||
|
||||
static void sequencer_dropboxes_add_to_lb(ListBase *lb)
|
||||
{
|
||||
WM_dropbox_add(
|
||||
lb, "SEQUENCER_OT_image_strip_add", image_drop_poll, sequencer_drop_copy, NULL, NULL);
|
||||
WM_dropbox_add(
|
||||
|
@ -498,6 +497,14 @@ static void sequencer_dropboxes(void)
|
|||
lb, "SEQUENCER_OT_sound_strip_add", sound_drop_poll, sequencer_drop_copy, NULL, NULL);
|
||||
}
|
||||
|
||||
static void sequencer_dropboxes(void)
|
||||
{
|
||||
ListBase *lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW);
|
||||
sequencer_dropboxes_add_to_lb(lb);
|
||||
lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_PREVIEW);
|
||||
sequencer_dropboxes_add_to_lb(lb);
|
||||
}
|
||||
|
||||
/* ************* end drop *********** */
|
||||
|
||||
/* DO NOT make this static, this hides the symbol and breaks API generation script. */
|
||||
|
@ -786,6 +793,9 @@ static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *region)
|
|||
/* Own keymap. */
|
||||
keymap = WM_keymap_ensure(wm->defaultconf, "SequencerPreview", SPACE_SEQ, 0);
|
||||
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
||||
|
||||
ListBase *lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_PREVIEW);
|
||||
WM_event_add_dropbox_handler(®ion->handlers, lb);
|
||||
}
|
||||
|
||||
static void sequencer_preview_region_layout(const bContext *C, ARegion *region)
|
||||
|
|
Loading…
Reference in New Issue