11#include <fmt/format.h>
53#include "RNA_prototypes.hh"
103 for (
Strip &strip : *
ed->current_strips()) {
104 if (
min_ii(strip.left_handle(), strip.content_start()) > v2d->
cur.
xmax) {
107 if (
max_ii(strip.right_handle(scene), strip.content_end(scene)) < v2d->
cur.
xmin) {
110 if (strip.channel + 1.0f < v2d->
cur.
ymin) {
113 if (strip.channel > v2d->
cur.
ymax) {
142 ctx.
quads = quads_batch;
158 if (strip_is_valid && overlays_enabled && overlay_option) {
220 strip_ctx.
strip = strip;
230 const double sound_offset = (strip->sound->offset_time + strip->sound_offset) *
231 scene->frames_per_second();
255 strip_ctx.
missing_media = media_presence_is_missing(scene, strip);
259 const ListBaseT<Strip> *seqbase = &strip->seqbase;
260 for (
const Strip &sub : *seqbase) {
261 if (!strip_has_valid_data(&sub)) {
264 if (media_presence_is_missing(scene, &sub)) {
278 strip_ctx.
curve =
nullptr;
285 strip_ctx.
curve =
nullptr;
293 if (showing_curve_overlay || showing_waveform) {
296 &ctx.
scene->
id, strip_ctx.
strip, RNA_Strip, prop_name, 0,
nullptr);
298 strip_ctx.
curve =
nullptr;
305 const bool show_strip_color_tag,
326 switch (strip->
type) {
350 if (strip->scene == curscene) {
430 blendcol[0] = blendcol[1] = blendcol[2] = 128;
459 return round_fl_to_int(frame_coord / frames_per_pixel) * frames_per_pixel;
479 const float samples_per_pixel = samples_per_frame * frames_per_pixel;
480 const float bottom = strip_ctx.
bottom + ctx.
pixely * 2.0f;
483 const float y_zero = half_style ? bottom : (bottom + top) / 2.0f;
485 const float y_scale = half_style ? top - bottom : (top - bottom) / 2.0f;
491 const float draw_start_frame =
max_ff(v2d->
cur.
xmin, strip_start_aligned);
494 float sample_start_frame = draw_start_frame - (strip->sound->offset_time + strip->sound_offset) *
495 scene->frames_per_second();
497 const int pixels_to_draw =
round_fl_to_int((draw_end_frame - draw_start_frame) /
500 if (pixels_to_draw < 2) {
507 if (waveform ==
nullptr || waveform->
is_empty()) {
513 uchar color_clip[4] = {255, 0, 0, 127};
514 uchar color_rms[4] = {255, 255, 255, 204};
517 const int waveform_sample_count = waveform->
size() / 3;
518 float prev_y_mid = y_zero;
519 for (
int i = 0; i < pixels_to_draw; i++) {
520 float timeline_frame = sample_start_frame + i * frames_per_pixel;
522 float sample = frame_index * samples_per_frame;
525 if (sample_index < 0) {
529 if (sample_index >= waveform_sample_count) {
533 float value_min = (*waveform)[sample_index * 3];
534 float value_max = (*waveform)[sample_index * 3 + 1];
535 float rms = (*waveform)[sample_index * 3 + 2];
537 if (samples_per_pixel > 1.0f) {
539 float next_pos =
sample + samples_per_pixel;
542 for (
int j = sample_index + 1; (j < waveform_sample_count) && (j < end_idx); j++) {
543 value_min =
min_ff(value_min, (*waveform)[j * 3]);
544 value_max =
max_ff(value_max, (*waveform)[j * 3 + 1]);
545 rms =
max_ff(rms, (*waveform)[j * 3 + 2]);
549 float volume = strip->volume;
550 if (strip_ctx.
curve !=
nullptr) {
551 float evaltime = draw_start_frame + (i * frames_per_pixel);
560 bool is_clipping =
false;
561 float clamped_min =
clamp_f(value_min, -1.0f, 1.0f);
562 float clamped_max =
clamp_f(value_max, -1.0f, 1.0f);
563 if (clamped_min != value_min || clamped_max != value_max) {
566 value_min = clamped_min;
567 value_max = clamped_max;
574 bool pos_min = value_min > 0.0f;
575 bool pos_max = value_max > 0.0f;
576 float abs_min = std::abs(value_min);
577 float abs_max = std::abs(value_max);
578 if (pos_min == pos_max) {
579 value_min = std::min(abs_min, abs_max);
580 value_max = std::max(abs_min, abs_max);
584 value_max = std::max(abs_min, abs_max);
588 float x1 = draw_start_frame + i * frames_per_pixel;
589 float x2 = draw_start_frame + (i + 1) * frames_per_pixel;
590 float y_min = y_zero + value_min * y_scale;
591 float y_max = y_zero + value_max * y_scale;
592 float y_mid = (y_max + y_min) * 0.5f;
595 if (y_max - y_min < ctx.
pixely * 2) {
598 if (std::abs(y_mid - prev_y_mid) > ctx.
pixely) {
599 float x0 = draw_start_frame + (i - 1) * frames_per_pixel;
605 float rms_min = y_zero +
max_ff(-rms, value_min) * y_scale;
606 float rms_max = y_zero +
min_ff(rms, value_max) * y_scale;
608 ctx.
quads->
add_quad(x1, rms_min, x2, rms_max, is_clipping ? color_clip : color_rms);
636 int chan_min = MAX_CHANNELS;
642 const float bottom = strip_ctx.
bottom + corner_radius * 0.8f * ctx.
pixely;
644 const float draw_range = top - bottom;
645 if (draw_range < ctx.
pixely) {
649 ListBaseT<SeqTimelineChannel> *meta_channels;
652 ListBaseT<Strip> *meta_seqbase = get_seqbase_from_strip(strip_meta, &meta_channels, &offset);
654 if (!meta_seqbase || meta_seqbase->is_empty()) {
659 offset = strip_meta->start - offset;
665 for (
Strip &strip : *meta_seqbase) {
666 chan_min =
min_ii(chan_min, strip.channel);
667 chan_max =
max_ii(chan_max, strip.channel);
670 chan_range = (chan_max - chan_min) + 1;
671 float draw_height = draw_range / chan_range;
679 for (
Strip &strip : *meta_seqbase) {
680 float x1_chan = strip.left_handle() + offset;
681 float x2_chan = strip.right_handle(scene) + offset;
682 if (x1_chan <= meta_x2 && x2_chan >= meta_x1) {
683 float y_chan = (strip.channel - chan_min) /
float(chan_range) * draw_range;
693 if (strip_ctx.
is_muted || render_is_muted(meta_channels, &strip)) {
700 const bool missing_data = !strip_has_valid_data(&strip);
701 const bool missing_media = media_presence_is_missing(scene, &strip);
702 if (missing_data || missing_media) {
709 x1_chan =
max_ff(x1_chan, meta_x1);
710 x2_chan =
min_ff(x2_chan, meta_x2);
713 float y2_chan = bottom + y_chan + (draw_height *
STRIP_OFSTOP);
715 ctx.
quads->
add_quad(x1_chan, y1_chan, x2_chan, y2_chan, col);
745 constexpr uchar col[4] = {255, 255, 255, 255};
746 const float text_margin = 1.2f * strip_ctx.
handle_width;
747 const float text_y = strip_ctx.
bottom + 0.09f;
752 text_x += text_margin;
764 const float handle_size = pixelx * (5.0f *
U.pixelsize);
767 return min_ff(handle_size, (
float(strip->right_handle(scene) - strip->left_handle()) / 4.0f));
772 const char *name = strip->name + 2;
773 if (name[0] ==
'\0') {
784 switch (strip->
type) {
788 r_source, source_maxncpy, strip->
data->dirpath, strip->
data->stripdata->filename);
792 if (strip->sound !=
nullptr) {
793 if (strip->sound->packedfile !=
nullptr) {
804 BLI_snprintf_utf8(r_source, source_maxncpy,
"Channel: %d", strip->multicam_source);
813 if (strip->scene !=
nullptr) {
814 if (strip->scene_camera !=
nullptr) {
818 strip->scene->id.name + 2,
819 strip->scene_camera->id.name + 2);
828 if (strip->clip !=
nullptr) {
834 if (strip->mask !=
nullptr) {
846 char *r_overlay_string,
847 size_t overlay_string_maxncpy)
851 const char *text_sep =
" | ";
852 const char *text_array[7];
862 if (source[0] !=
'\0') {
864 text_array[i++] = text_sep;
866 text_array[i++] = source;
872 BLI_assert(strip->scene_view_layer_name !=
nullptr);
874 text_array[i++] = text_sep;
876 text_array[i++] = strip->scene_view_layer_name;
880 char strip_duration_text[16];
884 text_array[i++] = text_sep;
886 text_array[i++] = strip_duration_text;
900 r_col[0] = r_col[1] = r_col[2] = r_col[3] = 255;
903 if (!active_or_selected) {
904 r_col[0] = r_col[1] = r_col[2] = 0;
915 r_col[0] = r_col[1] = r_col[2] = 192;
923 switch (strip->
type) {
925 return ICON_SCENE_DATA;
929 return ICON_MOD_MASK;
931 return ICON_FILE_MOVIE;
933 return ICON_FILE_SOUND;
935 return ICON_FILE_IMAGE;
940 return ICON_FONT_DATA;
942 return ICON_NODE_COMPOSITING;
956 return ICON_SHADERFX;
958 return ICON_SEQ_STRIP;
983 const float x_offset = (right - left - icon_size) * 0.5f;
984 const float y_offset = (top - bottom - icon_size) * 0.5f;
1006 const bool missing_data = strip.missing_data_block;
1007 const bool missing_media = strip.missing_media;
1008 const bool is_connected = strip.is_connected;
1009 const bool has_retiming = strip.has_retiming;
1010 if (!missing_data && !missing_media && !is_connected && !has_retiming) {
1024 rect.
ymax = strip.top;
1027 rect.
xmax =
min_ff(strip.right_handle - strip.handle_width,
1028 rect.
xmin + icon_size_x + icon_spacing);
1032 if (missing_media) {
1033 rect.
xmax =
min_ff(strip.right_handle - strip.handle_width,
1034 rect.
xmin + icon_size_x + icon_spacing);
1039 rect.
xmax =
min_ff(strip.right_handle - strip.handle_width,
1040 rect.
xmin + icon_size_x + icon_spacing);
1045 rect.
xmax =
min_ff(strip.right_handle - strip.handle_width,
1046 rect.
xmin + icon_size_x + icon_spacing);
1052 if (strip.can_draw_strip_content && strip.strip->type !=
STRIP_TYPE_META) {
1054 rect.
xmin = strip.left_handle + strip.handle_width;
1055 rect.
xmax = strip.right_handle - strip.handle_width;
1058 rect.
ymin = strip.bottom + pad_y;
1059 rect.
ymax = strip.strip_content_top - pad_y;
1073 if (missing_media) {
1097 ctx, strip_ctx, overlay_string,
sizeof(overlay_string));
1099 if (overlay_string_len == 0) {
1158 uchar col[4], blend_col[4];
1206 if (strip_ctx.
curve ==
nullptr) {
1218 if (eval_start >= eval_end) {
1222 const float y_height = strip_ctx.
top - strip_ctx.
bottom;
1223 float prev_x = eval_start;
1225 CLAMP(prev_val, 0.0f, 1.0f);
1228 for (
int timeline_frame = eval_start + eval_step; timeline_frame <= eval_end;
1229 timeline_frame += eval_step)
1232 CLAMP(curve_val, 0.0f, 1.0f);
1235 if (curve_val == prev_val && timeline_frame < eval_end - eval_step) {
1243 (prev_val * y_height) + strip_ctx.
bottom,
1246 timeline_frame - eval_step,
1247 (prev_val * y_height) + strip_ctx.
bottom,
1248 timeline_frame - eval_step,
1252 prev_x = timeline_frame - eval_step;
1256 (prev_val * y_height) + strip_ctx.
bottom,
1260 (curve_val * y_height) + strip_ctx.
bottom,
1264 prev_x = timeline_frame;
1265 prev_val = curve_val;
1275 if (strip_ctx.
strip != act_strip || act_strip ==
nullptr) {
1282 int channel = act_strip->multicam_source;
1311 while (i < v2d->cur.ymax) {
1330 r_bottom_layer.
clear();
1331 r_top_layer.
clear();
1336 for (
Strip *strip : strips) {
1339 r_bottom_layer.
append(strip_ctx);
1342 r_top_layer.
append(strip_ctx);
1349 for (int64_t index : range) {
1350 strip_draw_context_curve_get(ctx, r_bottom_layer[index]);
1354 for (int64_t index : range) {
1355 strip_draw_context_curve_get(ctx, r_top_layer[index]);
1376 strip.strip_content_top,
1380 strip.is_single_image);
1385 color3ubv_from_seq(scene, strip.strip, strip.show_strip_color_tag, strip.is_muted, col);
1388 if (strip.is_muted) {
1389 uchar muted_color[3] = {128, 128, 128};
1394 if (strip.missing_data_block || strip.missing_media) {
1395 uchar alert_color[4];
1406 const int color_offset = -15;
1407 uchar col_in[3] = {col[0], col[1], col[2]};
1412 col[0] = col_out[0];
1413 col[1] = col_out[1];
1414 col[2] = col_out[2];
1429 if (show_overlay && strip.can_draw_strip_content &&
1434 const Strip *input1 = strip.strip->input1;
1435 const Strip *input2 = strip.strip->input2;
1453 if (input1->
type == input2->
type) {
1495 uchar4 col{0, 0, 0, 255};
1510 if (!selected && !active) {
1528 if ((translating && overlaps && !use_overwrite) || clamped_l || clamped_r) {
1530 col[1] = col[2] = 33;
1533 else if (translating && selected) {
1547 if (act_strip !=
nullptr && (act_strip->flag &
SEQ_SELECT) != 0) {
1548 if (act_strip->input1 == strip.
strip || act_strip->input2 == strip.
strip) {
1552 if (special_preview == strip.
strip) {
1591 strip.strip_content_top,
1595 strip.is_single_image);
1639 if (!strip.can_draw_strip_content || strip.strip->type !=
STRIP_TYPE_TEXT) {
1644 if (
data ==
nullptr ||
data->text_len_bytes < 1 ||
data->color[3] < 0.01f) {
1648 const float content_height_px = (strip.strip_content_top - strip.bottom) / ctx.
pixely;
1658 float font_size = std::min(
data->text_size, content_height_px * 0.5f);
1660 const bool outline_is_dark = lightness > 0.37f;
1661 float outline_dark_color[4] = {0, 0, 0, 0.8f *
data->color[3]};
1662 float outline_light_color[4] = {1, 1, 1, 0.8f *
data->color[3]};
1672 constexpr float margin = 2.0f;
1678 BLF_clipping(font,
int(x1),
int(y1),
int(x2),
int(y2));
1679 BLF_position(font, x1 + margin, (y1 + y2) * 0.5f - font_size * 0.25f, 0.0f);
1743 if (ctx.
ed ==
nullptr) {
1771 const int frame_sta = scene->
r.
sfra;
1774 const int frame_end = scene->
r.
efra + 1;
1782 if (frame_sta < frame_end) {
1799 if (
ed && !
ed->metastack.is_empty()) {
1837 const uchar4 col{108, 108, 210, 255};
1842 drawdata->
quads->
add_quad(timeline_frame, stripe_bot, timeline_frame + 1, stripe_top, col);
1850 const uchar4 col{255, 25, 5, 100};
1852 float stripe_top = stripe_bot + drawdata->
stripe_ht;
1855 strip->left_handle(), stripe_bot, strip->right_handle(drawdata->
scene), stripe_top, col);
1858 drawdata->
quads->
add_quad(timeline_frame, stripe_bot, timeline_frame + 1, stripe_top, col);
1864 const float stripe_bot,
1865 const float stripe_ht,
1869 strip->left_handle(), stripe_bot, strip->right_handle(scene), stripe_bot + stripe_ht,
color);
1881 const uchar4 bg_final{78, 78, 145, 255};
1882 const uchar4 bg_raw{255, 25, 5, 25};
1903 for (
const Strip *strip : strips) {
1930 userdata.
scene = scene;
1934 userdata.
quads = &quads;
1958 float viewport_size[4];
1960 immUniform2f(
"viewport_size", viewport_size[2], viewport_size[3]);
1983 if (ctx.
scene ==
nullptr) {
2001 if (ctx.
scene ==
nullptr) {
2080 if (scene->
ed !=
nullptr) {
2110 if (tref ==
nullptr || !
STREQ(tref->
idname,
"builtin.blade")) {
2136 for (
Strip *strip_chain : chain) {
2154 if (!ignore_connections) {
2162 for (
Strip &candidate : *
ed->current_strips()) {
2163 if (only_selected && (candidate.flag &
SEQ_SELECT) == 0) {
2178 auto draw_view_rect = [&](
const rctf &rect) {
2186 const int channel_min =
max_ii(
int(box_rect.
ymin), 1);
2190 for (
int channel = channel_min; channel <= channel_max; channel++) {
2196 for (
const Strip *strip : targets) {
2200 if (cut_rect.
xmin < cut_rect.
xmax) {
2201 draw_view_rect(cut_rect);
2210 const char *identifier,
2211 const bool default_value)
2213 if (tref ==
nullptr) {
2214 return default_value;
2218 if (ot_split ==
nullptr) {
2219 return default_value;
2224 return default_value;
2248 const bool all_channels = (
event->modifier &
KM_SHIFT) != 0 ||
2251 const bool ignore_connections = !all_channels && ((
event->modifier &
KM_ALT) != 0 ||
2253 tref,
"ignore_connections",
false));
2255 if (!ignore_connections) {
2260 const std::optional<int> channel = all_channels ? std::nullopt :
2261 std::optional<int>(
int(mouse_co.y));
2267 if (
split.strips.is_empty() && !all_channels) {
2268 return std::nullopt;
2276 const int split_frame =
split.frame;
2285 if (
split.all_channels) {
2288 immRectf(pos,
x - 1.5f, region_offset.y,
x + 1.5f, region_offset.y + region->
winy);
2291 auto draw_lines = [&](
const float expand) {
2297 float x, y_bottom, y_top;
2302 y_bottom + region_offset.y - (
expand - 1.0f),
2304 y_top + region_offset.y + (
expand - 1.0f));
2328 if (region != customdata) {
2344 if (
G_MAIN->wm.first()) {
2359 gzgt->
name =
"Blade Widget";
2360 gzgt->
idname =
"SEQUENCER_GGT_blade";
2385 *r_exit_on_event =
false;
2387 std::string frames_str, timecode_str;
2392 auto range_str_get = [&](
const bool timecode) {
2398 frames_str = range_str_get(
false);
2399 timecode_str = range_str_get(
true);
2414 const float init_position[2] = {
float(event->xy[0]) + right_offset,
float(event->xy[1])};
2437 if (scene ==
nullptr || scene->
ed ==
nullptr) {
2441 std::optional<int> frame;
2446 frame =
split->frame;
2449 scene->
ed->edit_point_set(scene, frame);
#define SOUND_WAVE_SAMPLES_PER_SECOND
#define BLI_path_join(...)
#define SNPRINTF_UTF8(dst, format,...)
#define SNPRINTF_UTF8_RLEN(dst, format,...)
#define BLI_STR_UTF8_RIGHTWARDS_ARROW
#define REGION_DRAW_POST_VIEW
#define REGION_DRAW_PRE_VIEW
@ GPU_SEQ_FLAG_BACKGROUND
@ GPU_SEQ_FLAG_MISSING_CONTENT
@ GPU_SEQ_FLAG_THUMBNAILS_BACKGROUND
@ GPU_SEQ_FLAG_COLOR_BAND
@ GPU_SEQ_FLAG_TRANSITION
@ GPU_SEQ_FLAG_SELECTED_LH
@ GPU_SEQ_FLAG_SELECTED_RH
@ GPU_SEQ_FLAG_MISSING_TITLE
#define PRF_scope_with_name(ui_name, category)
#define ICON_DEFAULT_HEIGHT
#define UI_NO_ICON_OVERLAY_TEXT
#define UI_TIME_CACHE_MARGIN_Y
#define UI_TIME_SCRUB_MARGIN_Y
#define ND_SEQUENCER_PREFETCH
#define WM_UI_HANDLER_CONTINUE
constexpr IndexRange()=default
void add_multiple(Span< Key > keys)
bool contains(const Key &key) const
Span< Key > as_span() const
int64_t remove_if(Predicate &&predicate)
void append(const T &value)
void reserve(const int64_t min_capacity)
const T & data(const Action &owning_action) const
void add_quad(float x1, float y1, float x2, float y2, const uchar color[4])
void add_line(float x1, float y1, float x2, float y2, const uchar color[4])
void add_wire_quad(float x1, float y1, float x2, float y2, const uchar color[4])
SeqStripDrawData & add_strip(float content_start, float content_end, float top, float bottom, float content_top, float left_handle, float right_handle, float handle_width, bool single_image)
float pos_to_pixel_space_x(float x) const
float pos_to_pixel_space_y(float y) const
void sequencer_preview_add_sound(const bContext *C, const Strip *strip)
static void draw_seq_timeline_channels(const TimelineDrawContext &ctx)
float calc_strip_round_radius(float pixely)
static const char * draw_seq_text_get_name(const Strip *strip)
static void draw_cache_final_iter_fn(void *userdata, int timeline_frame)
float strip_handle_draw_size_get(const Scene *scene, const Strip *strip, float pixelx)
bool retiming_overlay_enabled(const SpaceSeq *sseq)
static void draw_icon_centered(const TimelineDrawContext &ctx, const rctf &rect, int icon_id, const uchar color[4], const float size=ICON_SIZE)
static void draw_strip_icons(const TimelineDrawContext &ctx, const Vector< StripDrawContext > &strips)
rctf strip_bounds_get(const Scene *scene, const Strip *strip)
static void draw_timeline_markers(const TimelineDrawContext &ctx)
static void draw_overlay_frame_indicator(const Scene *scene, const View2D *v2d)
static float align_frame_with_pixel(float frame_coord, float frames_per_pixel)
static void draw_multicam_highlight(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static void blade_paint_cursor_draw(bContext *C, const int2 &xy, const float2 &, void *customdata)
static void draw_seq_text_overlay(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
bool handle_is_selected(const Strip *strip, eStripHandle handle)
static void blade_paint_cursor_free_fn(void *customdata)
void draw_timeline_seq(const bContext *C, const ARegion *region)
static void draw_seq_strips(const TimelineDrawContext &ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
static void draw_cache_background(const bContext *C, const CacheDrawData *draw_data)
void draw_strip_thumbnails(const TimelineDrawContext &ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
static std::string blade_frame_str_get(const Scene *scene, const int frame, const bool timecode)
static bool seq_draw_waveforms_poll(const SpaceSeq *sseq, const Strip *strip)
void SEQUENCER_GGT_blade(wmGizmoGroupType *gzgt)
static void strip_data_outline_params_set(const StripDrawContext &strip, const TimelineDrawContext &ctx, SeqStripDrawData &data)
static void draw_strip_offsets(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static void draw_strips_foreground(const TimelineDrawContext &ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
uint color_pack(const uchar rgba[4])
void sequencer_blade_tooltip_show(bContext *C)
static void blade_edit_point_update(bContext *C)
static void draw_timeline_gizmos(const TimelineDrawContext &ctx)
static size_t draw_seq_text_get_overlay_string(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx, char *r_overlay_string, size_t overlay_string_maxncpy)
static wmOperator * box_blade_op_get(wmWindow *win)
static void draw_timeline_grid(const TimelineDrawContext &ctx)
static void strip_data_highlight_flags_set(const StripDrawContext &strip, const TimelineDrawContext &ctx, SeqStripDrawData &data)
static int blade_handler(bContext *C, const wmEvent *event, void *)
static void strip_draw_context_set_text_overlay_visibility(const TimelineDrawContext &ctx, StripDrawContext &strip_ctx)
static ARegion * blade_tooltip_init(bContext *C, ARegion *region, int *, double *, bool *r_exit_on_event)
static TimelineDrawContext timeline_draw_context_get(const bContext *C, SeqQuadsBatch *quads_batch)
static void draw_strip_texts(const TimelineDrawContext &ctx, const StripsDrawBatch &batch, const Vector< StripDrawContext > &strips)
static void draw_cache_view(const bContext *C)
void sequencer_blade_handlers_add(ARegion *region)
rctf box_blade_rect_get(wmOperator *op, const View2D *v2d)
static void WIDGETGROUP_blade_setup(const bContext *C, wmGizmoGroup *gzgroup)
static void strip_draw_context_set_retiming_overlay_visibility(const TimelineDrawContext &ctx, StripDrawContext &strip_ctx)
Strip * special_preview_get()
static void draw_seq_fcurve_overlay(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static bool blade_paint_cursor_poll(bContext *C)
static void draw_timeline_post_view_callbacks(const TimelineDrawContext &ctx)
void sequencer_retiming_draw_segments(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static void strip_data_lock_flags_set(const StripDrawContext &strip, const TimelineDrawContext &ctx, SeqStripDrawData &data)
static void blade_split_draw(Scene *scene, const ARegion *region, const BladeSplit &split)
static bool strip_hides_text_overlay_first(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
constexpr float ICON_SIZE_THUMBNAIL
static void strip_draw_context_set_strip_content_visibility(const TimelineDrawContext &ctx, StripDrawContext &strip_ctx)
static void strip_data_handle_flags_set(const StripDrawContext &strip, const TimelineDrawContext &ctx, SeqStripDrawData &data)
static void seq_prefetch_wm_notify(const bContext *C, Scene *scene)
static void draw_retiming_segments(const TimelineDrawContext &ctx, const Vector< StripDrawContext > &strips)
static void draw_cache_stripe(const Scene *scene, const Strip *strip, SeqQuadsBatch &quads, const float stripe_bot, const float stripe_ht, const uchar color[4])
static void draw_strips_background(const TimelineDrawContext &ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
static void draw_cache_source_iter_fn(void *userdata, const Strip *strip, int timeline_frame)
static StripDrawContext strip_draw_context_get(const TimelineDrawContext &ctx, Strip *strip)
void draw_timeline_seq_display(const bContext *C, ARegion *region)
static void strip_data_missing_media_flags_set(const StripDrawContext &strip, SeqStripDrawData &data)
constexpr float ICON_SIZE
void sequencer_retiming_keys_draw(const TimelineDrawContext &ctx, Span< StripDrawContext > strips)
static void waveform_job_start_if_needed(const bContext *C, const Strip *strip)
static void strip_draw_context_curve_get(const TimelineDrawContext &ctx, StripDrawContext &strip_ctx)
bool can_select_handle(const Scene *scene, const Strip *strip)
static void draw_timeline_pre_view_callbacks(const TimelineDrawContext &ctx)
static void draw_timeline_sfra_efra(const TimelineDrawContext &ctx)
static void draw_handle_transform_text(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx, eStripHandle handle)
static int get_icon_id_from_strip_type(const Strip *strip)
static void drawmeta_contents(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx, float corner_radius)
static void color3ubv_from_seq(const Scene *curscene, const Strip *strip, const bool show_strip_color_tag, const bool is_muted, uchar r_col[3])
static bool split_tool_prop_from_toolsettings(bToolRef *tref, const char *identifier, const bool default_value)
static void split_expand_strips(Editing *ed, Strip *strip, const seq::StripRelation include, VectorSet< Strip * > &targets)
void sequencer_retiming_speed_labels_draw(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static float strip_header_size_get(const TimelineDrawContext &ctx)
static void draw_seq_waveform_overlay(const TimelineDrawContext &ctx, const StripDrawContext &strip_ctx)
static std::optional< BladeSplit > blade_split_get(Scene *scene, const ARegion *region, const wmWindow *win, bToolRef *tref, const int2 &xy)
static void box_blade_draw(Scene *scene, const ARegion *region, wmOperator *op)
bool split_only_selected_get(wmOperator *op)
Vector< Strip * > sequencer_visible_strips_get(const bContext *C)
static void draw_seq_text_get_source(const Strip *strip, char *r_source, size_t source_maxncpy)
static void visible_strips_ordered_get(const TimelineDrawContext &ctx, Vector< StripDrawContext > &r_bottom_layer, Vector< StripDrawContext > &r_top_layer)
static void get_strip_text_color(const StripDrawContext &strip_ctx, uchar r_col[4])
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
bool prefetch_need_redraw(const bContext *C, Scene *scene)
std::recursive_mutex & text_runtime_mutex_get()
ListBaseT< Strip > * active_seqbase_get(const Editing *ed)
void source_image_cache_iterate(Scene *scene, void *userdata, void callback_iter(void *userdata, const Strip *strip, int timeline_frame))
void final_image_cache_iterate(Scene *scene, void *userdata, void callback_iter(void *userdata, int timeline_frame))
float give_frame_index(const Scene *scene, const Strip *strip, float timeline_frame)
Editing * editing_get(const Scene *scene)
bool strip_can_have_thumbnail(const Scene *scene, const Strip *strip)
void timeline_boundbox(const Scene *scene, const ListBaseT< Strip > *seqbase, rctf *r_rect)
bool effect_is_transition(StripType type)
Vector< Strip * > edit_split_strips_get(Scene *scene, const int frame, const std::optional< int > channel, const bool only_selected)
const char * strip_give_name(const Strip *strip)
void expand_strips(Editing *ed, VectorSet< Strip * > &strips, const StripRelation include)
bool transform_single_image_check(const Strip *strip)
Strip * select_active_get(const Scene *scene)
constexpr int MAX_CHANNELS
int text_effect_font_get(TextVars &text)
void thumbnail_cache_discard_requests_outside(Scene *scene, const rctf &rect)
bool transform_is_locked(const ListBaseT< SeqTimelineChannel > *channels, const Strip *strip)
ListBaseT< SeqTimelineChannel > * channels_displayed_get(const Editing *ed)
Map< SeqRetimingKey *, Strip * > retiming_selection_get(const Editing *ed)
eSeqOverlapMode tool_settings_overlap_mode_get(Scene *scene)
bool edit_frame_splits_strip(const Scene *scene, const Strip *strip, const int timeline_frame)
void thumbnail_cache_maintain_capacity(Scene *scene)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
void get_color_4ubv(int colorid, unsigned char col[4])
void get_color_blend_shade_3ubv(int colorid1, int colorid2, float fac, int offset, unsigned char col[3])
void theme_store(bThemeState *theme_state)
void theme_set(int spacetype, int regionid)
void frame_buffer_clear(int colorid)
void get_color_shade_3ubv(int colorid, int offset, unsigned char col[3])
const bTheme * theme_get()
void theme_restore(const bThemeState *theme_state)
void get_color_shade_alpha_4ubv(int colorid, int coloffset, int alphaoffset, unsigned char col[4])
void get_color_blend_3ubv(int colorid1, int colorid2, float fac, unsigned char col[3])
void get_color_3ubv(int colorid, unsigned char col[3])
void get_color_shade_4ubv(int colorid, int offset, unsigned char col[4])
char char char char void view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, size_t str_len, const unsigned char col[4])
void view2d_view_to_region_fl(const View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void view2d_view_ortho(const View2D *v2d)
float view2d_pixel_size_get_y(const View2D *v2d)
void view2d_view_restore(const bContext *C)
void icon_draw_ex(float x, float y, int icon_id, float aspect, float alpha, float desaturate, const uchar mono_color[4], bool mono_border, const IconTextOverlay *text_overlay, const bool inverted=false, float scale=1.0f)
void view2d_view_to_region_rcti(const View2D *v2d, const rctf *rect_src, rcti *rect_dst) ATTR_NONNULL()
void view2d_text_cache_draw(ARegion *region)
void view2d_scrollers_draw(View2D *v2d, const rcti *mask_custom)
float view2d_scale_get_y(const View2D *v2d)
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
ARegion * tooltip_create_from_func(bContext *C, FunctionRef< void(TooltipData &data)> create_fn, const float init_position[2])
void view2d_text_cache_add_rectf(View2D *v2d, const rctf *rect_view, const char *str, size_t str_len, const unsigned char col[4])
float view2d_region_to_view_y(const View2D *v2d, float y)
float view2d_pixel_size_get_x(const View2D *v2d)
void tooltip_text_field_add(TooltipData &data, std::string text, std::string suffix, const TooltipStyle style, const TooltipColorID color_id, const bool is_pad=false)
View2D * view2d_fromcontext(const bContext *C)
void view2d_draw_lines_x_frames(const View2D *v2d, const Scene *scene, bool display_seconds, bool show_fractions, bool draw_minor_lines)
void view2d_view_orthoSpecial(ARegion *region, View2D *v2d, bool xaxis)
float view2d_view_to_region_x(const View2D *v2d, float x)
MINLINE float min_ff(float a, float b)
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
VecBase< uint8_t, 4 > uchar4
void ED_time_scrub_draw_current_frame(const ARegion *region, const Scene *scene, bool display_seconds, bool display_stalk, bool clamp_playhead)
ScrArea * CTX_wm_area(const bContext *C)
void ED_time_scrub_draw(const ARegion *region, const Scene *scene, bool display_seconds, bool discrete_frames, const int base)
void wmOrtho2_region_pixelspace(const ARegion *region)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
@ SEQ_TIMELINE_ALL_WAVEFORMS
@ SEQ_TIMELINE_SHOW_STRIP_OFFSETS
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_STRIP_NAME
@ SEQ_TIMELINE_NO_WAVEFORMS
@ SEQ_TIMELINE_SHOW_FCURVES
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_THUMBNAILS
@ SEQ_TIMELINE_WAVEFORMS_HALF
@ SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG
void BLF_shadow_offset(int fontid, int x, int y)
void BLF_position(int fontid, float x, float y, float z)
Scene * CTX_data_sequencer_scene(const bContext *C)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
@ SEQ_EDIT_OVERLAY_FRAME_ABS
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
MINLINE int round_fl_to_int(float a)
wmEventHandler_UI * WM_event_add_ui_handler(const bContext *C, ListBaseT< wmEventHandler > *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const eWM_EventHandlerFlag flag)
wmOperator * WM_operator_find_modal_by_type(wmWindow *win, const wmOperatorType *ot)
void immUniformColor4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void immUniform2f(const char *name, float x, float y)
void rgb_byte_set_hue_float_offset(unsigned char rgb[3], float hue_offset)
GPUVertFormat * immVertexFormat()
void ED_markers_draw(const bContext *C, int flag)
bool ED_markers_region_visible(const ScrArea *area, const ARegion *region)
void immBegin(GPUPrimType, uint vertex_len)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
wmWindow * CTX_wm_window(const bContext *C)
MINLINE int max_ii(int a, int b)
void immUniformThemeColorAlpha(int color_id, float a)
MINLINE void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
MINLINE float srgb_to_grayscale(const float rgb[3])
void BLF_disable(int fontid, FontFlags flag)
SpaceSeq * CTX_wm_space_seq(const bContext *C)
@ GPU_BLEND_ALPHA_PREMULT
void ED_time_scrub_frame_str_get(const Scene *scene, bool display_seconds, const float frame, char *r_str, uint str_maxncpy)
@ STRIP_TYPE_GAUSSIAN_BLUR
const Vector< float > * BKE_sound_runtime_get_waveform(const bSound *sound)
void immBindBuiltinProgram(GPUBuiltinShader shader_id)
void immUniformThemeColor(int color_id)
void BLF_size(int fontid, float size)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
void immUniform1f(const char *name, float x)
void immVertex2f(uint attr_id, float x, float y)
void GPU_viewport_size_get_f(float coords[4])
BMesh const char void * data
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_3D_LINE_DASHED_UNIFORM_COLOR
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
@ SEQ_CACHE_SHOW_FINAL_OUT
void immUniformColor4f(float r, float g, float b, float a)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
@ SEQ_AUDIO_DRAW_WAVEFORM
rcti ED_time_scrub_clamp_scroller_mask(const rcti &scroller_mask)
void BLF_clipping(int fontid, int xmin, int ymin, int xmax, int ymax)
void GPU_framebuffer_bind_no_srgb(gpu::FrameBuffer *fb)
void ANIM_draw_previewrange(const Scene *scene, View2D *v2d, int end_frame_width)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void BLF_draw(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmPaintCursor * WM_paint_cursor_activate(short space_type, short region_type, wmPaintCursorPoll poll, wmPaintCursorDraw draw, void *customdata)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
gpu::FrameBuffer * GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport)
void immUniform4f(const char *name, float x, float y, float z, float w)
void GPU_matrix_pop_projection()
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
MINLINE float max_ff(float a, float b)
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
void WM_event_remove_ui_handler(ListBaseT< wmEventHandler > *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
FCurve * id_data_find_fcurve(ID *id, void *data, StructRNA *type, const char *prop_name, int index, bool *r_driven)
void GPU_blend(GPUBlend blend)
bool BKE_fcurve_is_empty(const FCurve *fcu)
void immUniform1i(const char *name, int x)
size_t BLI_string_join_array(char *result, size_t result_maxncpy, const char *strings[], uint strings_num) ATTR_NONNULL()
bool ED_gizmo_poll_or_unlink_delayed_from_tool(const bContext *C, wmGizmoGroupType *gzgt)
void GPU_matrix_push_projection()
GPUViewport * WM_draw_region_get_viewport(ARegion *region)
MINLINE int min_ii(int a, int b)
void GPU_depth_test(GPUDepthTest test)
void immRectf(uint pos, float x1, float y1, float x2, float y2)
void WM_tooltip_immediate_init(bContext *C, wmWindow *win, ScrArea *area, ARegion *region, wmTooltipInitFn init)
ARegion * CTX_wm_region(const bContext *C)
void BLF_enable(int fontid, FontFlags flag)
MINLINE int round_db_to_int(double a)
void BLF_color4fv(int fontid, const float rgba[4])
@ WM_GIZMOMAP_DRAWSTEP_2D
float evaluate_fcurve(const FCurve *fcu, float evaltime)
MINLINE float clamp_f(float value, float min, float max)
bool WM_paint_cursor_end(wmPaintCursor *handle)
bool BKE_sound_runtime_start_waveform_loading(bSound *sound)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ThemeStripColor strip_color[9]
bke::ARegionRuntime * runtime
eEditingOverlayFrameFlag overlay_frame_flag
eSpaceSeq_SequencerCacheOverlay_Flag flag
eSpaceSeq_SequencerTimelineOverlay_Flag flag
eSpaceSeq_Gizmo_Flag gizmo_flag
struct SequencerTimelineOverlay timeline_overlay
struct SequencerCacheOverlay cache_overlay
ListBaseT< wmEventHandler > handlers
VectorSet< Strip * > strips
bool show_strip_color_tag
bool can_draw_retiming_overlay
bool can_draw_strip_content
bool can_draw_text_overlay
Map< SeqRetimingKey *, Strip * > retiming_selection
ListBaseT< SeqTimelineChannel > * channels
gpu::FrameBuffer * framebuffer_overlay
wmGizmoMapType_Params gzmap_params
void(*) customdata_free(void *)
bke::WindowRuntime * runtime
#define ISKEYMODIFIER(event_type)