Blender V4.3
sequencer_drag_drop.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_sound_types.h"
#include "BLI_blenlib.h"
#include "BLI_string_ref.hh"
#include "BLI_string_utils.hh"
#include "BKE_context.hh"
#include "BKE_file_handler.hh"
#include "BKE_image.hh"
#include "BKE_main.hh"
#include "SEQ_channels.hh"
#include "SEQ_iterator.hh"
#include "SEQ_sequencer.hh"
#include "SEQ_transform.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "GPU_matrix.hh"
#include "ED_screen.hh"
#include "ED_transform.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "sequencer_intern.hh"
#include "sequencer_strips_batch.hh"

Go to the source code of this file.

Classes

struct  SeqDropCoords
struct  DropJobData

Functions

static void generic_poll_operations (const wmEvent *event, uint8_t type)
static bool test_single_file_handler_poll (const bContext *C, wmDrag *drag, blender::StringRef file_handler)
static bool image_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool is_movie (wmDrag *drag)
static bool movie_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static bool is_sound (wmDrag *drag)
static bool sound_drop_poll (bContext *C, wmDrag *drag, const wmEvent *event)
static float update_overlay_strip_position_data (bContext *C, const int mval[2])
static void sequencer_drop_copy (bContext *C, wmDrag *drag, wmDropBox *drop)
static void get_drag_path (const bContext *C, wmDrag *drag, char r_path[FILE_MAX])
static void draw_seq_in_view (bContext *C, wmWindow *, wmDrag *drag, const int xy[2])
static bool generic_drop_draw_handling (wmDropBox *drop)
static void prefetch_data_fn (void *custom_data, wmJobWorkerStatus *)
static void free_prefetch_data_fn (void *custom_data)
static void start_audio_video_job (bContext *C, wmDrag *drag, bool only_audio)
static void video_prefetch (bContext *C, wmDrag *drag)
static void audio_prefetch (bContext *C, wmDrag *drag)
static void movie_drop_on_enter (wmDropBox *drop, wmDrag *)
static void sound_drop_on_enter (wmDropBox *drop, wmDrag *)
static void image_drop_on_enter (wmDropBox *drop, wmDrag *)
static void sequencer_drop_on_exit (wmDropBox *drop, wmDrag *)
static void nop_draw_droptip_fn (bContext *, wmWindow *, wmDrag *, const int[2])
static void sequencer_dropboxes_add_to_lb (ListBase *lb)
static bool image_drop_preview_poll (bContext *, wmDrag *drag, const wmEvent *)
static bool movie_drop_preview_poll (bContext *, wmDrag *drag, const wmEvent *)
static bool sound_drop_preview_poll (bContext *, wmDrag *drag, const wmEvent *)
static void sequencer_preview_dropboxes_add_to_lb (ListBase *lb)
void sequencer_dropboxes ()

Variables

static SeqDropCoords g_drop_coords {}

Function Documentation

◆ audio_prefetch()

void audio_prefetch ( bContext * C,
wmDrag * drag )
static

Definition at line 621 of file sequencer_drag_drop.cc.

References C, is_sound(), and start_audio_video_job().

Referenced by sequencer_dropboxes_add_to_lb().

◆ draw_seq_in_view()

void draw_seq_in_view ( bContext * C,
wmWindow * ,
wmDrag * drag,
const int xy[2] )
static

Definition at line 363 of file sequencer_drag_drop.cc.

References ARRAY_SIZE, batch, BKE_main_blendfile_path(), BLI_assert, BLI_path_rel(), BLI_path_split_file_part(), BLI_rctf_size_x(), BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), BLI_string_join_array(), C, SeqDropCoords::channel, SeqDropCoords::channel_len, blender::ed::seq::color_pack(), CTX_data_main(), CTX_wm_region(), CTX_wm_space_seq(), View2D::cur, data, ED_draw_sequencer_snap_point(), FILE_MAX, SequencerTimelineOverlay::flag, floorf, g_drop_coords, get_drag_path(), GPU_blend(), GPU_BLEND_ALPHA_PREMULT, GPU_BLEND_NONE, GPU_matrix_pop(), GPU_matrix_push(), GPU_SEQ_FLAG_ACTIVE, GPU_SEQ_FLAG_BACKGROUND, GPU_SEQ_FLAG_BORDER, GPU_SEQ_FLAG_SELECTED, SeqDropCoords::in_use, SeqDropCoords::is_intersecting, View2D::mask, min_ff(), RGN_TYPE_WINDOW, SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_TIMELINE_SHOW_STRIP_DURATION, SEQ_TIMELINE_SHOW_STRIP_NAME, SEQ_TIMELINE_SHOW_STRIP_SOURCE, SeqDropCoords::snap_point_x, SNPRINTF, SPACE_SEQ, SeqDropCoords::start_frame, TH_SEQ_ACTIVE, TH_SEQ_AUDIO, TH_SEQ_MOVIE, TH_SEQ_SELECTED, SpaceSeq::timeline_overlay, SeqDropCoords::type, U, UI_GetThemeColor3ubv(), UI_SCALE_FAC, UI_SetTheme(), UI_Theme_Restore(), UI_Theme_Store(), UI_view2d_text_cache_add_rectf(), UI_view2d_text_cache_draw(), update_overlay_strip_position_data(), SeqDropCoords::use_snapping, USER_SEQ_ED_SIMPLE_TWEAKING, ARegion::v2d, ARegion::winrct, wmOrtho2_region_pixelspace(), rctf::xmax, rctf::xmin, rcti::xmin, xy, rctf::ymax, rctf::ymin, and rcti::ymin.

Referenced by sequencer_dropboxes_add_to_lb().

◆ free_prefetch_data_fn()

void free_prefetch_data_fn ( void * custom_data)
static

Definition at line 582 of file sequencer_drag_drop.cc.

References MEM_freeN().

Referenced by start_audio_video_job().

◆ generic_drop_draw_handling()

bool generic_drop_draw_handling ( wmDropBox * drop)
static

◆ generic_poll_operations()

void generic_poll_operations ( const wmEvent * event,
uint8_t type )
static

Definition at line 72 of file sequencer_drag_drop.cc.

References g_drop_coords, and KM_CTRL.

Referenced by image_drop_poll(), movie_drop_poll(), and sound_drop_poll().

◆ get_drag_path()

◆ image_drop_on_enter()

◆ image_drop_poll()

◆ image_drop_preview_poll()

bool image_drop_preview_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

◆ is_movie()

◆ is_sound()

◆ movie_drop_on_enter()

void movie_drop_on_enter ( wmDropBox * drop,
wmDrag *  )
static

Definition at line 628 of file sequencer_drag_drop.cc.

References generic_drop_draw_handling().

Referenced by sequencer_dropboxes_add_to_lb().

◆ movie_drop_poll()

bool movie_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ movie_drop_preview_poll()

bool movie_drop_preview_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

◆ nop_draw_droptip_fn()

void nop_draw_droptip_fn ( bContext * ,
wmWindow * ,
wmDrag * ,
const int [2] )
static

Definition at line 663 of file sequencer_drag_drop.cc.

Referenced by sequencer_dropboxes_add_to_lb().

◆ prefetch_data_fn()

◆ sequencer_drop_copy()

◆ sequencer_drop_on_exit()

void sequencer_drop_on_exit ( wmDropBox * drop,
wmDrag *  )
static

◆ sequencer_dropboxes()

◆ sequencer_dropboxes_add_to_lb()

◆ sequencer_preview_dropboxes_add_to_lb()

void sequencer_preview_dropboxes_add_to_lb ( ListBase * lb)
static

◆ sound_drop_on_enter()

void sound_drop_on_enter ( wmDropBox * drop,
wmDrag *  )
static

Definition at line 635 of file sequencer_drag_drop.cc.

References generic_drop_draw_handling().

Referenced by sequencer_dropboxes_add_to_lb().

◆ sound_drop_poll()

bool sound_drop_poll ( bContext * C,
wmDrag * drag,
const wmEvent * event )
static

◆ sound_drop_preview_poll()

bool sound_drop_preview_poll ( bContext * ,
wmDrag * drag,
const wmEvent *  )
static

◆ start_audio_video_job()

◆ test_single_file_handler_poll()

bool test_single_file_handler_poll ( const bContext * C,
wmDrag * drag,
blender::StringRef file_handler )
static

◆ update_overlay_strip_position_data()

◆ video_prefetch()

void video_prefetch ( bContext * C,
wmDrag * drag )
static

Definition at line 614 of file sequencer_drag_drop.cc.

References C, is_movie(), and start_audio_video_job().

Referenced by sequencer_dropboxes_add_to_lb().

Variable Documentation

◆ g_drop_coords