50# include <AUD_Sound.h>
51# include <AUD_Special.h>
99 return paths.size() == 1 && file_handlers.size() == 1 &&
100 file_handler == file_handlers[0]->idname;
215 scene, region, start_frame, end_frame, &snap_delta, &snap_frame);
219 start_frame += snap_delta;
221 end_frame = start_frame + strip_len;
243 scene,
ed->current_strips(), &dummy_strip);
287 int max_channel = -1;
288 for (
Strip *strip : strips) {
289 max_channel =
max_ii(strip->channel, max_channel);
292 if (max_channel != -1) {
301 if (id_type ==
ID_IM) {
311 else if (id_type ==
ID_MC) {
316 else if (id_type ==
ID_SO) {
352 if (id_type ==
ID_IM) {
356 else if (id_type ==
ID_MC) {
360 else if (id_type ==
ID_SO) {
405 uchar strip_color[4];
406 strip_color[3] = 255;
407 uchar text_color[4] = {255, 255, 255, 255};
433 strip_color[0] = 255;
434 strip_color[1] = strip_color[2] = 33;
438 text_color[0] = text_color[1] = text_color[2] = 255;
443 text_color[0] = text_color[1] = text_color[2] = 10;
447 strip_color[3] = 204;
451 const float handle_size = pixelx * (5.0f *
U.pixelsize);
455 float text_margin_x = 2.0f * handle_size;
458 rect.
xmin = x1 + text_margin_x;
459 rect.
ymin = text_margin_y;
460 rect.
xmax = x2 - text_margin_x;
471 const char *text_sep =
" | ";
472 const char *text_array[5];
476 char strip_duration_text[16];
477 int len_text_arr = 0;
483 text_array[len_text_arr++] = filename;
489 text_array[len_text_arr++] = text_sep;
490 text_array[len_text_arr++] = path;
495 text_array[len_text_arr++] = text_sep;
496 text_array[len_text_arr++] = strip_duration_text;
502 text_display,
FILE_MAX, text_array, len_text_arr);
505 ®ion->
v2d, &rect, text_display, text_display_len, text_color);
520 if (coords && coords->
in_use) {
547 AUD_Sound *sound = AUD_Sound_file(job_data->
path);
548 if (sound !=
nullptr) {
550 AUD_SoundInfo info = AUD_getInfo(sound);
558 AUD_Sound_free(sound);
569 if (anim !=
nullptr) {
575 AUD_Sound *sound = AUD_Sound_file(job_data->
path);
576 if (sound !=
nullptr) {
578 AUD_SoundInfo info = AUD_getInfo(sound);
582 AUD_Sound_free(sound);
604 "Loading previews...",
749 "SEQUENCER_OT_image_strip_add",
756 "SEQUENCER_OT_movie_strip_add",
763 "SEQUENCER_OT_sound_strip_add",
wmWindow * CTX_wm_window(const bContext *C)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
Scene * CTX_data_sequencer_scene(const bContext *C)
MovieReader * openanim(const char *filepath, int ibuf_flags, int streamindex, bool keep_original_colorspace, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
void BLI_path_split_dir_file(const char *filepath, char *dir, size_t dir_maxncpy, char *file, size_t file_maxncpy) ATTR_NONNULL(1
bool void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define SNPRINTF_UTF8(dst, format,...)
size_t BLI_string_join_array(char *result, size_t result_maxncpy, const char *strings[], uint strings_num) ATTR_NONNULL()
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_STRIP_NAME
@ GPU_SEQ_FLAG_BACKGROUND
@ GPU_BLEND_ALPHA_PREMULT
void GPU_blend(GPUBlend blend)
Read Guarded memory(de)allocation.
void UI_Theme_Store(bThemeState *theme_state)
void UI_Theme_Restore(const bThemeState *theme_state)
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
void UI_SetTheme(int spacetype, int regionid)
void UI_view2d_text_cache_draw(ARegion *region)
void UI_view2d_text_cache_add_rectf(View2D *v2d, const rctf *rect_view, const char *str, size_t str_len, const unsigned char col[4])
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
@ WM_JOB_TYPE_SEQ_DRAG_DROP_PREVIEW
BMesh const char void * data
struct @021025263243242147216143265077100330027142264337::@225245033123204053237120173316075113304004012000 batch
void * MEM_mallocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
void MOV_close(MovieReader *anim)
int MOV_get_duration_frames(MovieReader *anim, IMB_Timecode_Type tc)
float MOV_get_fps(const MovieReader *anim)
blender::Vector< FileHandlerType * > file_handlers_poll_file_drop(const bContext *C, const blender::Span< std::string > paths)
static void draw_strip_in_view(bContext *C, wmWindow *, wmDrag *drag, const int xy[2])
static void nop_draw_droptip_fn(bContext *, wmWindow *, wmDrag *, const int[2])
static bool image_drop_preview_poll(bContext *, wmDrag *drag, const wmEvent *)
void sequencer_dropboxes()
static void sequencer_drop_on_exit(wmDropBox *drop, wmDrag *)
static bool movie_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
static bool is_sound(wmDrag *drag)
uint color_pack(const uchar rgba[4])
static bool sound_drop_preview_poll(bContext *, wmDrag *drag, const wmEvent *)
static bool is_movie(wmDrag *drag)
static void prefetch_data_fn(void *custom_data, wmJobWorkerStatus *)
static bool test_single_file_handler_poll(const bContext *C, wmDrag *drag, blender::StringRef file_handler)
static void video_prefetch(bContext *C, wmDrag *drag)
static void sequencer_drop_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
static float update_overlay_strip_position_data(bContext *C, const int mval[2])
static void sequencer_preview_dropboxes_add_to_lb(ListBase *lb)
static void start_audio_video_job(bContext *C, wmDrag *drag, bool only_audio)
static void audio_prefetch(bContext *C, wmDrag *drag)
static SeqDropCoords g_drop_coords
static bool generic_drop_draw_handling(wmDropBox *drop)
static void sequencer_dropboxes_add_to_lb(ListBase *lb)
static void get_drag_path(const bContext *C, wmDrag *drag, char r_path[FILE_MAX])
static bool movie_drop_preview_poll(bContext *, wmDrag *drag, const wmEvent *)
static bool image_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
static void sound_drop_on_enter(wmDropBox *drop, wmDrag *)
static void generic_poll_operations(const wmEvent *event, uint8_t type)
static bool sound_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
static void free_prefetch_data_fn(void *custom_data)
static void movie_drop_on_enter(wmDropBox *drop, wmDrag *)
static void image_drop_on_enter(wmDropBox *drop, wmDrag *)
ListBase * channels_displayed_get(const Editing *ed)
void strip_channel_set(Strip *strip, int channel)
bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
Editing * editing_ensure(Scene *scene)
VectorSet< Strip * > query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
ListBase * active_seqbase_get(const Editing *ed)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_collection_clear(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier)
#define DEFAULT_IMG_STRIP_LENGTH
struct SequencerTimelineOverlay timeline_overlay
float media_playback_rate
void(* on_drag_start)(bContext *C, wmDrag *drag)
void(* on_exit)(wmDropBox *drop, wmDrag *drag)
void(* on_enter)(wmDropBox *drop, wmDrag *drag)
void(* draw_in_view)(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2])
void(* draw_droptip)(bContext *C, wmWindow *win, wmDrag *drag, const int xy[2])
struct wmEvent * eventstate
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *C, wmDrag *drag, const wmEvent *event), void(*copy)(bContext *C, wmDrag *drag, wmDropBox *drop), void(*cancel)(Main *bmain, wmDrag *drag, wmDropBox *drop), WMDropboxTooltipFunc tooltip)
blender::Span< std::string > WM_drag_get_paths(const wmDrag *drag)
int WM_drag_get_path_file_type(const wmDrag *drag)
bool WM_drag_is_ID_type(const wmDrag *drag, int idcode)
const char * WM_drag_get_single_path(const wmDrag *drag)
ID * WM_drag_get_local_ID_or_import_from_asset(const bContext *C, const wmDrag *drag, int idcode)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
void wmOrtho2_region_pixelspace(const ARegion *region)