67 frame_index = end - timeline_frame;
70 frame_index = timeline_frame - sta;
74 frame_index =
clamp_f(frame_index, 0, end - sta);
82 frame_index -=
fmodf((
double)frame_index, (
double)seq->
strobe);
117 startofs = start - seq->
start;
121 endofs = seq->
start + seq->
len - end;
124 double offset_time = 0.0f;
131 seq->
start + startofs,
149 if (seq_meta ==
NULL) {
196 else if (seq->
seq1) {
200 else if (seq->
seq2) {
218 if (effects ==
NULL) {
238 const bool do_skip_mute,
239 const bool do_center,
240 const bool do_unselected)
246 int dist, best_dist, best_frame = timeline_frame;
247 int seq_frames[2], seq_frames_tot;
255 return timeline_frame;
282 for (i = 0; i < seq_frames_tot; i++) {
283 const int seq_frame = seq_frames[i];
289 if (seq_frame < timeline_frame) {
290 dist = timeline_frame - seq_frame;
294 if (seq_frame > timeline_frame) {
295 dist = seq_frame - timeline_frame;
299 dist =
abs(seq_frame - timeline_frame);
303 if (dist < best_dist) {
304 best_frame = seq_frame;
328 return (
float)frs_sec / frs_sec_base;
356 if (seqbase ==
NULL) {
367 if (rect->
ymax < seq->machine) {
368 rect->
ymax = seq->machine;
381 const int timeline_frame)
394 const int initial_frame,
400 const int sfra = (int)rectf.
xmin;
401 const int efra = (
int)rectf.
xmax;
402 int timeline_frame = initial_frame;
409 for (; timeline_frame >= sfra; timeline_frame--) {
415 timeline_frame = initial_frame;
419 for (; timeline_frame <= efra; timeline_frame++) {
427 for (; timeline_frame <= efra; timeline_frame++) {
429 const int gap_end_frame = timeline_frame;
439 const int timeline_frame)
457 seq->
startofs = unity_start_offset / speed_factor;
459 seq->
endofs = unity_end_offset / speed_factor;
501 seq->
start = timeline_frame;
528 if (val >= right_handle_orig_frame) {
529 val = right_handle_orig_frame - 1;
544 if (val <= left_handle_orig_frame) {
545 val = left_handle_orig_frame + 1;
548 seq->
endofs = strip_content_end_frame - val;
typedef float(TangentPoint)[2]
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 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(struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base)
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)
ListBase * SEQ_channels_displayed_get(Editing *ed)
SeqCollection * SEQ_query_all_strips(ListBase *seqbase)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq)
SeqCollection * seq_sequence_lookup_effects_by_seq(const Scene *scene, const Sequence *key)
Sequence * seq_sequence_lookup_meta_by_seq(const Scene *scene, const Sequence *key)
Editing * SEQ_editing_get(const Scene *scene)
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)
void SEQ_time_speed_factor_set(const Scene *scene, Sequence *seq, const float speed_factor)
static float seq_time_media_playback_rate_factor_get(const Scene *scene, const Sequence *seq)
void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int val)
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_update_meta_strip_range(const Scene *scene, Sequence *seq_meta)
void seq_update_sound_bounds_recursive(const Scene *scene, Sequence *metaseq)
void SEQ_timeline_init_boundbox(const Scene *scene, rctf *rect)
void seq_time_update_effects_strip_range(const Scene *scene, SeqCollection *effects)
void SEQ_timeline_expand_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
void seq_time_translate_handles(const Scene *scene, Sequence *seq, const int offset)
int SEQ_time_left_handle_frame_get(const Scene *UNUSED(scene), const Sequence *seq)
void SEQ_timeline_boundbox(const Scene *scene, const ListBase *seqbase, rctf *rect)
void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int val)
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)
bool SEQ_time_strip_intersects_frame(const Scene *scene, const Sequence *seq, const int timeline_frame)
float seq_give_frame_index(const Scene *scene, Sequence *seq, float timeline_frame)
static bool strip_exists_at_frame(const Scene *scene, SeqCollection *all_strips, const int timeline_frame)
static float seq_time_playback_rate_factor_get(const Scene *scene, const Sequence *seq)
float SEQ_time_start_frame_get(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
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)