44 # include <AUD_Sound.h>
45 # include <AUD_Special.h>
81 if (
ELEM(drag->
icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) {
98 if (
ELEM(drag->
icon, ICON_FILE_MOVIE, ICON_FILE_BLANK)) {
121 if (
ELEM(drag->
icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) {
178 scene, region, start_frame, end_frame, &snap_delta, &snap_frame);
182 start_frame += snap_delta;
184 end_frame = start_frame + strip_len;
203 .speed_factor = 1.0f,
223 if (id_type ==
ID_IM) {
233 else if (id_type ==
ID_MC) {
238 else if (id_type ==
ID_SO) {
245 else if (drag->
path[0]) {
298 int max_channel = -1;
303 if (max_channel != -1) {
316 if (id_type ==
ID_IM) {
320 else if (id_type ==
ID_MC) {
324 else if (id_type ==
ID_SO) {
373 float strip_color[3];
374 uchar text_color[4] = {255, 255, 255, 255};
397 strip_color[0] = 1.0f;
398 strip_color[1] = strip_color[2] = 0.3f;
402 text_color[0] = text_color[1] = text_color[2] = 255;
406 text_color[0] = text_color[1] = text_color[2] = 10;
420 immRectf(
pos, x1 - pixelx, y2 - 2 * pixely,
x2 + pixelx, y2);
422 float handle_size = 8.0f;
425 float text_margin_y = y2 -
min_ff(0.40f, 20 *
U.dpi_fac * pixely);
426 float text_margin_x = 2.0f * (pixelx * handle_size) *
U.pixelsize;
429 rect.
xmin = x1 + text_margin_x;
430 rect.ymin = text_margin_y;
431 rect.xmax =
x2 - text_margin_x;
434 if (rect.xmax <= rect.xmin) {
442 const char *text_sep =
" | ";
443 const char *text_array[5];
447 char strip_duration_text[16];
448 int len_text_arr = 0;
454 text_array[len_text_arr++] = filename;
460 text_array[len_text_arr++] = text_sep;
461 text_array[len_text_arr++] = path;
465 SNPRINTF(strip_duration_text,
"%d", (
int)(
x2 - x1));
466 text_array[len_text_arr++] = text_sep;
467 text_array[len_text_arr++] = strip_duration_text;
475 ®ion->
v2d, &rect, text_display, strlen(text_display), text_color);
491 if (coords && coords->
in_use) {
515 #ifdef WITH_AUDASPACE
517 AUD_Sound *sound = AUD_Sound_file(job_data->
path);
520 AUD_SoundInfo info = AUD_getInfo(sound);
524 AUD_Sound_free(sound);
530 char colorspace[64] =
"\0";
544 #ifdef WITH_AUDASPACE
546 AUD_Sound *sound = AUD_Sound_file(job_data->
path);
549 AUD_SoundInfo info = AUD_getInfo(sound);
553 AUD_Sound_free(sound);
578 "SeqDragDropPreviewData");
685 if (
ELEM(drag->
icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) {
698 if (
ELEM(drag->
icon, 0, ICON_FILE_MOVIE, ICON_FILE_BLANK)) {
711 if (
ELEM(drag->
icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) {
722 "SEQUENCER_OT_image_strip_add",
729 "SEQUENCER_OT_movie_strip_add",
736 "SEQUENCER_OT_sound_strip_add",
typedef float(TangentPoint)[2]
struct Scene * CTX_data_scene(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct SpaceSeq * CTX_wm_space_seq(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct anim * openanim(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
const char * BKE_main_blendfile_path_from_global(void)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
void BLI_split_dirfile(const char *string, char *dir, char *file, size_t dirlen, size_t filelen)
void BLI_path_rel(char *file, const char *relfile) ATTR_NONNULL()
void BLI_split_file_part(const char *string, char *file, size_t filelen)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
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)
#define SNPRINTF(dst, format,...)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
char * BLI_string_join_array(char *result, size_t result_len, const char *strings[], uint strings_len) ATTR_NONNULL()
#define SEQ_STRIP_OFSBOTTOM
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_STRIP_NAME
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void GPU_matrix_pop(void)
void GPU_matrix_push(void)
@ GPU_SHADER_2D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base)
void IMB_free_anim(struct anim *anim)
int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
#define SEQ_ITERATOR_FOREACH(var, collection)
void UI_GetThemeColor3fv(int colorid, float col[3])
void UI_Theme_Restore(struct bThemeState *theme_state)
void UI_SetTheme(int spacetype, int regionid)
void UI_Theme_Store(struct bThemeState *theme_state)
void UI_view2d_view_ortho(const struct View2D *v2d)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_text_cache_draw(struct ARegion *region)
void UI_view2d_text_cache_add_rectf(struct View2D *v2d, const struct rctf *rect_view, const char *str, size_t str_len, const unsigned char col[4])
@ WM_JOB_TYPE_SEQ_DRAG_DROP_PREVIEW
ListBase * SEQ_channels_displayed_get(Editing *ed)
SeqCollection * SEQ_query_rendered_strips(const Scene *scene, ListBase *channels, ListBase *seqbase, const int timeline_frame, const int displayed_channel)
void SEQ_collection_free(SeqCollection *collection)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_collection_clear(PointerRNA *ptr, const char *name)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_collection_add(PointerRNA *ptr, const char *name, PointerRNA *r_value)
void RNA_struct_property_unset(PointerRNA *ptr, const char *identifier)
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Editing * SEQ_editing_ensure(Scene *scene)
Editing * SEQ_editing_get(const Scene *scene)
static void movie_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag))
static float update_overlay_strip_position_data(bContext *C, const int mval[2])
struct SeqDropCoords SeqDropCoords
static void sequencer_drop_draw_deactivate(struct wmDropBox *drop, wmDrag *UNUSED(drag))
static bool generic_drop_draw_handling(struct wmDropBox *drop)
void sequencer_dropboxes(void)
static bool sound_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *event)
static void start_audio_video_job(bContext *C, wmDrag *drag, bool only_audio)
static void generic_poll_operations(const wmEvent *event, uint8_t type)
static void audio_prefetch(bContext *C, wmDrag *drag)
static void image_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag))
static bool movie_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *event)
static void video_prefetch(bContext *C, wmDrag *drag)
static void nop_draw_droptip_fn(bContext *UNUSED(C), wmWindow *UNUSED(win), wmDrag *UNUSED(drag), const int UNUSED(xy[2]))
static void sequencer_dropboxes_add_to_lb(ListBase *lb)
static void prefetch_data_fn(void *custom_data, short *UNUSED(stop), short *UNUSED(do_update), float *UNUSED(progress))
struct DropJobData DropJobData
static bool image_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *event)
static bool image_drop_preview_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
static void sequencer_preview_dropboxes_add_to_lb(ListBase *lb)
static void draw_seq_in_view(bContext *C, wmWindow *UNUSED(win), wmDrag *drag, const int xy[2])
static void sequencer_drop_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
static void free_prefetch_data_fn(void *custom_data)
static void sound_drop_draw_activate(struct wmDropBox *drop, wmDrag *UNUSED(drag))
static bool movie_drop_preview_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
static bool is_movie(wmDrag *drag)
static bool is_sound(wmDrag *drag)
static bool sound_drop_preview_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
static SeqDropCoords g_drop_coords
static void get_drag_path(wmDrag *drag, char r_path[FILE_MAX])
#define DEFAULT_IMG_STRIP_LENGTH
struct Sequence * find_nearest_seq(struct Scene *scene, struct View2D *v2d, int *hand, const int mval[2])
struct SequencerTimelineOverlay timeline_overlay
void(* draw_deactivate)(struct wmDropBox *drop, struct wmDrag *drag)
void(* on_drag_start)(struct bContext *C, struct wmDrag *drag)
void(* draw_droptip)(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
void(* draw_activate)(struct wmDropBox *drop, struct wmDrag *drag)
void(* draw_in_view)(struct bContext *C, struct wmWindow *win, struct wmDrag *drag, const int xy[2])
struct wmEvent * eventstate
ID * WM_drag_get_local_ID_or_import_from_asset(const wmDrag *drag, int idcode)
bool WM_drag_is_ID_type(const wmDrag *drag, int idcode)
ListBase * WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
wmDropBox * WM_dropbox_add(ListBase *lb, const char *idname, bool(*poll)(bContext *, wmDrag *, const wmEvent *), void(*copy)(bContext *, wmDrag *, wmDropBox *), void(*cancel)(Main *, wmDrag *, wmDropBox *), WMDropboxTooltipFunc tooltip)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
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 *))
void WM_jobs_timer(wmJob *wm_job, double timestep, unsigned int note, unsigned int endnote)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, int flag, int job_type)