Blender V4.3
sequencer_timeline_draw.cc File Reference
#include <cmath>
#include <cstring>
#include "BLI_array.hh"
#include "BLI_blenlib.h"
#include "BLI_string_utils.hh"
#include "BLI_task.hh"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sound_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
#include "BKE_context.hh"
#include "BKE_fcurve.hh"
#include "BKE_global.hh"
#include "BKE_sound.h"
#include "ED_anim_api.hh"
#include "ED_markers.hh"
#include "ED_mask.hh"
#include "ED_sequencer.hh"
#include "ED_space_api.hh"
#include "ED_time_scrub_ui.hh"
#include "GPU_matrix.hh"
#include "IMB_imbuf.hh"
#include "RNA_prototypes.hh"
#include "SEQ_channels.hh"
#include "SEQ_connect.hh"
#include "SEQ_effects.hh"
#include "SEQ_prefetch.hh"
#include "SEQ_relations.hh"
#include "SEQ_render.hh"
#include "SEQ_retiming.hh"
#include "SEQ_select.hh"
#include "SEQ_sequencer.hh"
#include "SEQ_thumbnail_cache.hh"
#include "SEQ_time.hh"
#include "SEQ_transform.hh"
#include "SEQ_utils.hh"
#include "UI_interface_icons.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "BLF_api.hh"
#include "MEM_guardedalloc.h"
#include "sequencer_intern.hh"
#include "sequencer_quads_batch.hh"
#include "sequencer_strips_batch.hh"

Go to the source code of this file.

Classes

struct  CacheDrawData
 

Functions

Vector< Sequence * > sequencer_visible_strips_get (const bContext *C)
 
Vector< Sequence * > sequencer_visible_strips_get (const Scene *scene, const View2D *v2d)
 
static TimelineDrawContext timeline_draw_context_get (const bContext *C, SeqQuadsBatch *quads_batch)
 
static bool seq_draw_waveforms_poll (const SpaceSeq *sseq, const Sequence *seq)
 
static bool strip_hides_text_overlay_first (const TimelineDrawContext *ctx, const StripDrawContext *strip_ctx)
 
static void strip_draw_context_set_text_overlay_visibility (TimelineDrawContext *ctx, StripDrawContext *strip_ctx)
 
static void strip_draw_context_set_strip_content_visibility (TimelineDrawContext *ctx, StripDrawContext *strip_ctx)
 
static void strip_draw_context_set_retiming_overlay_visibility (TimelineDrawContext *ctx, StripDrawContext *strip_ctx)
 
static StripDrawContext strip_draw_context_get (TimelineDrawContext *ctx, Sequence *seq)
 
static void strip_draw_context_curve_get (const TimelineDrawContext *ctx, StripDrawContext &strip_ctx)
 
static void color3ubv_from_seq (const Scene *curscene, const Sequence *seq, const bool show_strip_color_tag, const bool is_muted, uchar r_col[3])
 
static void waveform_job_start_if_needed (const bContext *C, const Sequence *seq)
 
static float align_frame_with_pixel (float frame_coord, float frames_per_pixel)
 
static void draw_seq_waveform_overlay (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx)
 
static void drawmeta_contents (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx, float corner_radius)
 
static void draw_handle_transform_text (const TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx, eSeqHandle handle)
 
float sequence_handle_size_get_clamped (const Scene *scene, Sequence *seq, const float pixelx)
 
static const char * draw_seq_text_get_name (const Sequence *seq)
 
static void draw_seq_text_get_source (const Sequence *seq, char *r_source, size_t source_maxncpy)
 
static size_t draw_seq_text_get_overlay_string (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx, char *r_overlay_string, size_t overlay_string_len)
 
static void get_strip_text_color (const StripDrawContext *strip, uchar r_col[4])
 
static void draw_icon_centered (TimelineDrawContext &ctx, const rctf &rect, int icon_id, const uchar color[4])
 
static void draw_strip_icons (TimelineDrawContext *timeline_ctx, const Vector< StripDrawContext > &strips)
 
static void draw_seq_text_overlay (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx)
 
static void draw_strip_offsets (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx)
 
static void draw_seq_fcurve_overlay (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx)
 
static void draw_multicam_highlight (TimelineDrawContext *timeline_ctx, const StripDrawContext *strip_ctx)
 
static void seq_prefetch_wm_notify (const bContext *C, Scene *scene)
 
static void draw_seq_timeline_channels (TimelineDrawContext *ctx)
 
static void visible_strips_ordered_get (TimelineDrawContext *timeline_ctx, Vector< StripDrawContext > &r_bottom_layer, Vector< StripDrawContext > &r_top_layer)
 
static void draw_strips_background (TimelineDrawContext *timeline_ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
 
static void strip_data_missing_media_flags_set (const StripDrawContext &strip, SeqStripDrawData &data)
 
static void strip_data_lock_flags_set (const StripDrawContext &strip, const TimelineDrawContext *timeline_ctx, SeqStripDrawData &data)
 
static void strip_data_outline_params_set (const StripDrawContext &strip, const TimelineDrawContext *timeline_ctx, SeqStripDrawData &data)
 
static void strip_data_highlight_flags_set (const StripDrawContext &strip, const TimelineDrawContext *timeline_ctx, SeqStripDrawData &data)
 
static void strip_data_handle_flags_set (const StripDrawContext &strip, const TimelineDrawContext *timeline_ctx, SeqStripDrawData &data)
 
static void draw_strips_foreground (TimelineDrawContext *timeline_ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
 
static void draw_retiming_continuity_ranges (TimelineDrawContext *timeline_ctx, const Vector< StripDrawContext > &strips)
 
static void draw_seq_strips (TimelineDrawContext *timeline_ctx, StripsDrawBatch &strips_batch, const Vector< StripDrawContext > &strips)
 
static void draw_seq_strips (TimelineDrawContext *timeline_ctx, StripsDrawBatch &strips_batch)
 
static void draw_timeline_sfra_efra (TimelineDrawContext *ctx)
 
static bool draw_cache_view_init_fn (void *, size_t item_count)
 
static bool draw_cache_view_iter_fn (void *userdata, Sequence *seq, int timeline_frame, int cache_type)
 
static void draw_cache_stripe (const Scene *scene, const Sequence *seq, SeqQuadsBatch &quads, const float stripe_bot, const float stripe_ht, const uchar color[4])
 
static void draw_cache_background (const bContext *C, CacheDrawData *draw_data)
 
static void draw_cache_view (const bContext *C)
 
static void draw_overlap_frame_indicator (const Scene *scene, const View2D *v2d)
 
static void draw_timeline_grid (TimelineDrawContext *ctx)
 
static void draw_timeline_backdrop (TimelineDrawContext *ctx)
 
static void draw_timeline_markers (TimelineDrawContext *ctx)
 
static void draw_timeline_gizmos (TimelineDrawContext *ctx)
 
static void draw_timeline_pre_view_callbacks (TimelineDrawContext *ctx)
 
static void draw_timeline_post_view_callbacks (TimelineDrawContext *ctx)
 
void draw_timeline_seq (const bContext *C, ARegion *region)
 
void draw_timeline_seq_display (const bContext *C, ARegion *region)
 

Variables

constexpr int MUTE_ALPHA = 120
 
constexpr float ICON_SIZE = 12.0f
 

Function Documentation

◆ align_frame_with_pixel()

static float align_frame_with_pixel ( float frame_coord,
float frames_per_pixel )
static

Definition at line 461 of file sequencer_timeline_draw.cc.

References round_fl_to_int().

Referenced by draw_seq_waveform_overlay().

◆ color3ubv_from_seq()

◆ draw_cache_background()

◆ draw_cache_stripe()

static void draw_cache_stripe ( const Scene * scene,
const Sequence * seq,
SeqQuadsBatch & quads,
const float stripe_bot,
const float stripe_ht,
const uchar color[4] )
static

◆ draw_cache_view()

◆ draw_cache_view_init_fn()

static bool draw_cache_view_init_fn ( void * ,
size_t item_count )
static

Definition at line 1682 of file sequencer_timeline_draw.cc.

Referenced by draw_cache_view().

◆ draw_cache_view_iter_fn()

◆ draw_handle_transform_text()

◆ draw_icon_centered()

◆ draw_multicam_highlight()

◆ draw_overlap_frame_indicator()

◆ draw_retiming_continuity_ranges()

◆ draw_seq_fcurve_overlay()

◆ draw_seq_strips() [1/2]

◆ draw_seq_strips() [2/2]

◆ draw_seq_text_get_name()

static const char * draw_seq_text_get_name ( const Sequence * seq)
static

◆ draw_seq_text_get_overlay_string()

◆ draw_seq_text_get_source()

◆ draw_seq_text_overlay()

◆ draw_seq_timeline_channels()

◆ draw_seq_waveform_overlay()

◆ draw_strip_icons()

◆ draw_strip_offsets()

◆ draw_strips_background()

◆ draw_strips_foreground()

◆ draw_timeline_backdrop()

◆ draw_timeline_gizmos()

◆ draw_timeline_grid()

◆ draw_timeline_markers()

◆ draw_timeline_post_view_callbacks()

◆ draw_timeline_pre_view_callbacks()

◆ draw_timeline_seq()

◆ draw_timeline_seq_display()

◆ draw_timeline_sfra_efra()

◆ drawmeta_contents()

◆ get_strip_text_color()

◆ seq_draw_waveforms_poll()

◆ seq_prefetch_wm_notify()

static void seq_prefetch_wm_notify ( const bContext * C,
Scene * scene )
static

◆ sequence_handle_size_get_clamped()

float sequence_handle_size_get_clamped ( const Scene * scene,
Sequence * seq,
const float pixelx )

◆ sequencer_visible_strips_get() [1/2]

◆ sequencer_visible_strips_get() [2/2]

◆ strip_data_handle_flags_set()

◆ strip_data_highlight_flags_set()

◆ strip_data_lock_flags_set()

static void strip_data_lock_flags_set ( const StripDrawContext & strip,
const TimelineDrawContext * timeline_ctx,
SeqStripDrawData & data )
static

◆ strip_data_missing_media_flags_set()

◆ strip_data_outline_params_set()

◆ strip_draw_context_curve_get()

◆ strip_draw_context_get()

static StripDrawContext strip_draw_context_get ( TimelineDrawContext * ctx,
Sequence * seq )
static

Definition at line 203 of file sequencer_timeline_draw.cc.

References StripDrawContext::bottom, StripDrawContext::can_draw_strip_content, StripDrawContext::can_draw_text_overlay, TimelineDrawContext::channels, StripDrawContext::content_end, StripDrawContext::content_start, StripDrawContext::curve, SequencerTimelineOverlay::flag, FPS, StripDrawContext::handle_width, StripDrawContext::is_active_strip, StripDrawContext::is_connected, StripDrawContext::is_muted, StripDrawContext::is_single_image, StripDrawContext::left_handle, LISTBASE_FOREACH, Sequence::machine, max_ff(), min_ff(), StripDrawContext::missing_data_block, StripDrawContext::missing_media, bSound::offset_time, TimelineDrawContext::pixelx, TimelineDrawContext::pixely, StripDrawContext::right_handle, TimelineDrawContext::scene, StripDrawContext::seq, SEQ_is_strip_connected(), SEQ_render_is_muted(), SEQ_select_active_get(), SEQ_sequence_has_valid_data(), SEQ_STRIP_OFSBOTTOM, SEQ_STRIP_OFSTOP, SEQ_time_content_end_frame_get(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_time_start_frame_get(), SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG, SEQ_transform_single_image_check(), SEQ_TYPE_META, SEQ_TYPE_SOUND_RAM, Sequence::seqbase, sequence_handle_size_get_clamped(), StripDrawContext::show_strip_color_tag, Sequence::sound, Sequence::sound_offset, TimelineDrawContext::sseq, StripDrawContext::strip_content_top, strip_draw_context_set_retiming_overlay_visibility(), strip_draw_context_set_strip_content_visibility(), strip_draw_context_set_text_overlay_visibility(), StripDrawContext::strip_is_too_small, StripDrawContext::strip_length, SpaceSeq::timeline_overlay, StripDrawContext::top, Sequence::type, and UI_SCALE_FAC.

Referenced by visible_strips_ordered_get().

◆ strip_draw_context_set_retiming_overlay_visibility()

◆ strip_draw_context_set_strip_content_visibility()

static void strip_draw_context_set_strip_content_visibility ( TimelineDrawContext * ctx,
StripDrawContext * strip_ctx )
static

◆ strip_draw_context_set_text_overlay_visibility()

◆ strip_hides_text_overlay_first()

◆ timeline_draw_context_get()

◆ visible_strips_ordered_get()

◆ waveform_job_start_if_needed()

static void waveform_job_start_if_needed ( const bContext * C,
const Sequence * seq )
static

Variable Documentation

◆ ICON_SIZE

float ICON_SIZE = 12.0f
constexpr

◆ MUTE_ALPHA

int MUTE_ALPHA = 120
constexpr

Definition at line 77 of file sequencer_timeline_draw.cc.

Referenced by draw_strip_offsets(), and draw_strips_background().