Blender V4.3
sequencer_retiming_draw.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "DNA_sequence_types.h"
#include "BKE_context.hh"
#include "BKE_fcurve.hh"
#include "BLF_api.hh"
#include "GPU_batch.hh"
#include "GPU_matrix.hh"
#include "GPU_state.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_keyframes_draw.hh"
#include "ED_keyframes_keylist.hh"
#include "ED_screen.hh"
#include "UI_view2d.hh"
#include "SEQ_connect.hh"
#include "SEQ_retiming.hh"
#include "SEQ_sequencer.hh"
#include "SEQ_time.hh"
#include "sequencer_intern.hh"
#include "sequencer_quads_batch.hh"

Go to the source code of this file.

Macros

#define KEY_SIZE   (10 * U.pixelsize)
 
#define KEY_CENTER   (UI_view2d_view_to_region_y(v2d, strip_y_rescale(seq, 0.0f)) + 4 + KEY_SIZE / 2)
 
#define RETIME_KEY_MOUSEOVER_THRESHOLD   (16.0f * UI_SCALE_FAC)
 

Functions

bool retiming_keys_can_be_displayed (const SpaceSeq *sseq)
 
static float strip_y_rescale (const Sequence *seq, const float y_value)
 
static float key_x_get (const Scene *scene, const Sequence *seq, const SeqRetimingKey *key)
 
static float pixels_to_view_width (const bContext *C, const float width)
 
static float pixels_to_view_height (const bContext *C, const float height)
 
static float strip_start_screenspace_get (const Scene *scene, const View2D *v2d, const Sequence *seq)
 
static float strip_end_screenspace_get (const Scene *scene, const View2D *v2d, const Sequence *seq)
 
static rctf strip_box_get (const Scene *scene, const View2D *v2d, const Sequence *seq)
 
rctf seq_retiming_keys_box_get (const Scene *scene, const View2D *v2d, const Sequence *seq)
 
int left_fake_key_frame_get (const bContext *C, const Sequence *seq)
 
int right_fake_key_frame_get (const bContext *C, const Sequence *seq)
 
static bool retiming_fake_key_frame_clicked (const bContext *C, const Sequence *seq, const int mval[2], int &r_frame)
 
void realize_fake_keys (const Scene *scene, Sequence *seq)
 
SeqRetimingKeytry_to_realize_fake_keys (const bContext *C, Sequence *seq, const int mval[2])
 
static SeqRetimingKeymouse_over_key_get_from_strip (const bContext *C, const Sequence *seq, const int mval[2])
 
SeqRetimingKeyretiming_mouseover_key_get (const bContext *C, const int mval[2], Sequence **r_seq)
 
static bool can_draw_retiming (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
 
Retiming Key
static void retime_key_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key, const KeyframeShaderBindings &sh_bindings)
 
void sequencer_retiming_draw_continuity (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
 
static SeqRetimingKey fake_retiming_key_init (const Scene *scene, const Sequence *seq, int key_x)
 
static bool fake_keys_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const KeyframeShaderBindings &sh_bindings)
 
void sequencer_retiming_keys_draw (const TimelineDrawContext *timeline_ctx, blender::Span< StripDrawContext > strips)
 
Retiming Speed Label
static size_t label_str_get (const Sequence *seq, const SeqRetimingKey *key, char *r_label_str, const size_t label_str_maxncpy)
 
static bool label_rect_get (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key, const char *label_str, const size_t label_len, rctf *rect)
 
static void retime_speed_text_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx, const SeqRetimingKey *key)
 
void sequencer_retiming_speed_draw (const TimelineDrawContext *timeline_ctx, const StripDrawContext &strip_ctx)
 

Macro Definition Documentation

◆ KEY_CENTER

◆ KEY_SIZE

#define KEY_SIZE   (10 * U.pixelsize)

◆ RETIME_KEY_MOUSEOVER_THRESHOLD

#define RETIME_KEY_MOUSEOVER_THRESHOLD   (16.0f * UI_SCALE_FAC)

Size in pixels.

Definition at line 102 of file sequencer_retiming_draw.cc.

Referenced by mouse_over_key_get_from_strip(), and retiming_fake_key_frame_clicked().

Function Documentation

◆ can_draw_retiming()

◆ fake_keys_draw()

◆ fake_retiming_key_init()

◆ key_x_get()

◆ label_rect_get()

◆ label_str_get()

static size_t label_str_get ( const Sequence * seq,
const SeqRetimingKey * key,
char * r_label_str,
const size_t label_str_maxncpy )
static

◆ left_fake_key_frame_get()

◆ mouse_over_key_get_from_strip()

◆ pixels_to_view_height()

static float pixels_to_view_height ( const bContext * C,
const float height )
static

Definition at line 72 of file sequencer_retiming_draw.cc.

References UI_view2d_fromcontext(), and UI_view2d_view_to_region_y().

Referenced by label_rect_get().

◆ pixels_to_view_width()

static float pixels_to_view_width ( const bContext * C,
const float width )
static

Definition at line 65 of file sequencer_retiming_draw.cc.

References UI_view2d_fromcontext(), and UI_view2d_view_to_region_x().

Referenced by label_rect_get().

◆ realize_fake_keys()

◆ retime_key_draw()

◆ retime_speed_text_draw()

◆ retiming_fake_key_frame_clicked()

◆ retiming_keys_can_be_displayed()

◆ retiming_mouseover_key_get()

◆ right_fake_key_frame_get()

◆ seq_retiming_keys_box_get()

rctf seq_retiming_keys_box_get ( const Scene * scene,
const View2D * v2d,
const Sequence * seq )

◆ sequencer_retiming_draw_continuity()

◆ sequencer_retiming_keys_draw()

◆ sequencer_retiming_speed_draw()

void sequencer_retiming_speed_draw ( const TimelineDrawContext * timeline_ctx,
const StripDrawContext & strip_ctx )

◆ strip_box_get()

static rctf strip_box_get ( const Scene * scene,
const View2D * v2d,
const Sequence * seq )
static

◆ strip_end_screenspace_get()

static float strip_end_screenspace_get ( const Scene * scene,
const View2D * v2d,
const Sequence * seq )
static

◆ strip_start_screenspace_get()

static float strip_start_screenspace_get ( const Scene * scene,
const View2D * v2d,
const Sequence * seq )
static

◆ strip_y_rescale()

static float strip_y_rescale ( const Sequence * seq,
const float y_value )
static

Definition at line 51 of file sequencer_retiming_draw.cc.

References Sequence::machine, SEQ_STRIP_OFSBOTTOM, and SEQ_STRIP_OFSTOP.

Referenced by label_rect_get(), and strip_box_get().

◆ try_to_realize_fake_keys()

SeqRetimingKey * try_to_realize_fake_keys ( const bContext * C,
Sequence * seq,
const int mval[2] )