65 float frame_index_max = seq->
len - 1;
69 frame_index_max = end - sta;
81 frame_index = end - timeline_frame;
84 frame_index = timeline_frame - sta;
87 frame_index =
max_ff(frame_index, 0);
93 frame_index = retiming_factor * frame_index_max;
96 frame_index =
clamp_f(frame_index, 0, frame_index_max);
99 frame_index -=
fmodf(
double(frame_index),
double(seq->
strobe));
128 if (seq->scene_sound) {
129 int startofs = seq->startofs;
130 int endofs = seq->endofs;
131 if (seq->startofs + seq->start < start) {
132 startofs = start - seq->start;
135 if (seq->start + seq->len - seq->endofs > end) {
136 endofs = seq->start + seq->len - end;
139 double offset_time = 0.0f;
140 if (seq->sound !=
nullptr) {
141 offset_time = seq->sound->offset_time + seq->sound_offset;
146 seq->start + startofs,
147 seq->start + seq->len - endofs,
148 startofs + seq->anim_startofs,
163 if (seq_meta ==
nullptr) {
201 if (seq->
seq1 ==
nullptr && seq->
seq2 ==
nullptr) {
211 else if (seq->
seq1) {
215 else if (seq->
seq2) {
249 const bool do_skip_mute,
250 const bool do_center,
251 const bool do_unselected)
256 int dist, best_dist, best_frame = timeline_frame;
257 int seq_frames[2], seq_frames_tot;
265 return timeline_frame;
275 if (do_unselected && (seq->flag &
SELECT)) {
292 for (i = 0; i < seq_frames_tot; i++) {
293 const int seq_frame = seq_frames[i];
299 if (seq_frame < timeline_frame) {
300 dist = timeline_frame - seq_frame;
304 if (seq_frame > timeline_frame) {
305 dist = seq_frame - timeline_frame;
309 dist =
abs(seq_frame - timeline_frame);
313 if (dist < best_dist) {
314 best_frame = seq_frame;
332 if (strip_anim->
anim ==
nullptr) {
338 return float(frs_sec) / frs_sec_base;
343 if (seq->
clip !=
nullptr) {
348 if (seq->
scene !=
nullptr) {
366 if (seqbase ==
nullptr) {
377 if (rect->
ymax < seq->machine + 1.0f) {
379 rect->
ymax = seq->machine + 1.0f;
392 const int timeline_frame)
404 const int initial_frame,
410 const int sfra =
int(rectf.
xmin);
411 const int efra =
int(rectf.
xmax);
412 int timeline_frame = initial_frame;
419 for (; timeline_frame >= sfra; timeline_frame--) {
425 timeline_frame = initial_frame;
429 for (; timeline_frame <= efra; timeline_frame++) {
437 for (; timeline_frame <= efra; timeline_frame++) {
439 const int gap_end_frame = timeline_frame;
449 const int timeline_frame)
490 seq->
start = timeline_frame;
523 if (timeline_frame >= right_handle_orig_frame) {
524 timeline_frame = right_handle_orig_frame - 1;
550 if (timeline_frame <= left_handle_orig_frame) {
551 timeline_frame = left_handle_orig_frame + 1;
575 const Scene *scene,
Sequence *seq,
int delta,
float subframe_delta,
bool recursed)
587 if (seq->
seq1 !=
nullptr || seq->
seq2 !=
nullptr) {
629 int sound_offset = 0;
float BKE_movieclip_get_fps(struct MovieClip *clip)
void BKE_sound_move_scene_sound(const struct Scene *scene, void *handle, int startframe, int endframe, int frameskip, double audio_offset)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE int max_ii(int a, int b)
bool IMB_anim_get_fps(const ImBufAnim *anim, bool no_av_base, short *r_frs_sec, float *r_frs_sec_base)
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 Invert a producing a negative Combine Generate a color from its and blue channels(Deprecated)") DefNode(ShaderNode
ListBase * SEQ_channels_displayed_get(Editing *ed)
draw_view in_light_buf[] float
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
VectorSet< Sequence * > SEQ_query_all_strips(ListBase *seqbase)
bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
Sequence * seq_sequence_lookup_meta_by_seq(const Scene *scene, const Sequence *key)
blender::Span< Sequence * > seq_sequence_lookup_effects_by_seq(const Scene *scene, const Sequence *key)
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
Editing * SEQ_editing_get(const Scene *scene)
bool SEQ_retiming_is_active(const Sequence *seq)
SeqRetimingKey * SEQ_retiming_last_key_get(const Sequence *seq)
int SEQ_retiming_key_timeline_frame_get(const Scene *scene, const Sequence *seq, const SeqRetimingKey *key)
float seq_retiming_evaluate(const Sequence *seq, const float frame_index)
float SEQ_give_frame_index(const Scene *scene, const Sequence *seq, float timeline_frame)
void SEQ_time_start_frame_set(const Scene *scene, Sequence *seq, int timeline_frame)
int SEQ_time_strip_length_get(const Scene *scene, const Sequence *seq)
static int metaseq_end(Sequence *metaseq)
int seq_time_strip_original_content_length_get(const Scene *scene, const Sequence *seq)
bool SEQ_time_has_right_still_frames(const Scene *scene, const Sequence *seq)
bool SEQ_time_has_left_still_frames(const Scene *scene, const Sequence *seq)
bool SEQ_time_has_still_frames(const Scene *scene, const Sequence *seq)
void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int timeline_frame)
void SEQ_time_update_meta_strip_range(const Scene *scene, Sequence *seq_meta)
void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int timeline_frame)
void seq_update_sound_bounds_recursive(const Scene *scene, Sequence *metaseq)
int SEQ_time_get_rounded_sound_offset(const Scene *scene, const Sequence *seq)
static void seq_time_slip_strip_ex(const Scene *scene, Sequence *seq, int delta, float subframe_delta, bool recursed)
int SEQ_time_left_handle_frame_get(const Scene *, const Sequence *seq)
void SEQ_timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
float SEQ_time_content_end_frame_get(const Scene *scene, const Sequence *seq)
void seq_time_translate_handles(const Scene *scene, Sequence *seq, const int offset)
void SEQ_time_slip_strip(const Scene *scene, Sequence *seq, int delta, float subframe_delta)
void seq_time_gap_info_get(const Scene *scene, ListBase *seqbase, const int initial_frame, GapInfo *r_gap_info)
static int metaseq_start(Sequence *metaseq)
void seq_time_effect_range_set(const Scene *scene, Sequence *seq)
float SEQ_time_sequence_get_fps(Scene *scene, Sequence *seq)
int SEQ_time_find_next_prev_edit(Scene *scene, int timeline_frame, const short side, const bool do_skip_mute, const bool do_center, const bool do_unselected)
void SEQ_timeline_init_boundbox(const Scene *scene, rctf *r_rect)
bool SEQ_time_strip_intersects_frame(const Scene *scene, const Sequence *seq, const int timeline_frame)
void SEQ_timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *r_rect)
void seq_time_update_effects_strip_range(const Scene *scene, const blender::Span< Sequence * > effects)
static bool strip_exists_at_frame(const Scene *scene, blender::Span< Sequence * > strips, const int timeline_frame)
float SEQ_time_start_frame_get(const Sequence *seq)
float SEQ_time_media_playback_rate_factor_get(const Scene *scene, const Sequence *seq)
static void seq_update_sound_bounds_recursive_impl(const Scene *scene, Sequence *metaseq, int start, int end)
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
float media_playback_rate
ccl_device_inline int abs(int x)