Blender V4.3
SEQ_time.hh File Reference

Go to the source code of this file.

Functions

void SEQ_timeline_init_boundbox (const Scene *scene, rctf *r_rect)
 
void SEQ_timeline_expand_boundbox (const Scene *scene, const ListBase *seqbase, rctf *rect)
 
void SEQ_timeline_boundbox (const Scene *scene, const ListBase *seqbase, rctf *r_rect)
 
float SEQ_time_sequence_get_fps (Scene *scene, Sequence *seq)
 
int SEQ_time_find_next_prev_edit (Scene *scene, int timeline_frame, short side, bool do_skip_mute, bool do_center, bool do_unselected)
 
bool SEQ_time_strip_intersects_frame (const Scene *scene, const Sequence *seq, int timeline_frame)
 
float SEQ_give_frame_index (const Scene *scene, const Sequence *seq, float timeline_frame)
 
bool SEQ_time_has_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_right_still_frames (const Scene *scene, const Sequence *seq)
 
int SEQ_time_left_handle_frame_get (const Scene *scene, const Sequence *seq)
 
int SEQ_time_right_handle_frame_get (const Scene *scene, const Sequence *seq)
 
void SEQ_time_left_handle_frame_set (const Scene *scene, Sequence *seq, int timeline_frame)
 
void SEQ_time_right_handle_frame_set (const Scene *scene, Sequence *seq, int timeline_frame)
 
int SEQ_time_strip_length_get (const Scene *scene, const Sequence *seq)
 
float SEQ_time_start_frame_get (const Sequence *seq)
 
float SEQ_time_content_end_frame_get (const Scene *scene, const Sequence *seq)
 
void SEQ_time_start_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_slip_strip (const Scene *scene, Sequence *seq, int delta, float subframe_delta)
 
float SEQ_time_media_playback_rate_factor_get (const Scene *scene, const Sequence *seq)
 
int SEQ_time_get_rounded_sound_offset (const Scene *scene, const Sequence *seq)
 

Function Documentation

◆ SEQ_give_frame_index()

◆ SEQ_time_content_end_frame_get()

◆ SEQ_time_find_next_prev_edit()

int SEQ_time_find_next_prev_edit ( Scene * scene,
int timeline_frame,
short side,
bool do_skip_mute,
bool do_center,
bool do_unselected )

Find start or end position of next or previous strip.

Parameters
sceneVideo editing scene
timeline_framereference frame for searching
sidedirection of searching, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT or SEQ_SIDE_BOTH.
do_centerfind closest strip center if true, otherwise finds closest handle position.
do_unselectedonly find closest position of unselected strip.

Definition at line 246 of file strip_time.cc.

References abs(), LISTBASE_FOREACH, MAXFRAME, SELECT, SEQ_channels_displayed_get(), SEQ_editing_get(), SEQ_render_is_muted(), SEQ_SIDE_BOTH, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), and Editing::seqbasep.

Referenced by strip_jump_internal().

◆ SEQ_time_get_rounded_sound_offset()

int SEQ_time_get_rounded_sound_offset ( const Scene * scene,
const Sequence * seq )

Get the sound offset (if any) and round it to the nearest integer. This is mostly used in places where subframe data is not allowed (like re-timing key positions). Returns zero if sequence is not a sound strip or if there is no offset.

Definition at line 627 of file strip_time.cc.

References FPS, bSound::offset_time, round_fl_to_int(), SEQ_TYPE_SOUND_RAM, Sequence::sound, Sequence::sound_offset, and Sequence::type.

Referenced by fake_retiming_key_init(), left_fake_key_frame_get(), right_fake_key_frame_get(), SEQ_retiming_add_key(), SEQ_retiming_key_timeline_frame_get(), SEQ_retiming_sound_animation_data_set(), and SEQ_time_strip_length_get().

◆ SEQ_time_has_left_still_frames()

bool SEQ_time_has_left_still_frames ( const Scene * scene,
const Sequence * seq )

Returns true if at beginning of strip there is no content to be rendered.

Definition at line 455 of file strip_time.cc.

References SEQ_time_left_handle_frame_get(), and SEQ_time_start_frame_get().

Referenced by SEQ_time_has_still_frames().

◆ SEQ_time_has_right_still_frames()

bool SEQ_time_has_right_still_frames ( const Scene * scene,
const Sequence * seq )

Returns true if at end of strip there is no content to be rendered.

Definition at line 460 of file strip_time.cc.

References SEQ_time_content_end_frame_get(), and SEQ_time_right_handle_frame_get().

Referenced by SEQ_time_has_still_frames().

◆ SEQ_time_has_still_frames()

bool SEQ_time_has_still_frames ( const Scene * scene,
const Sequence * seq )

Returns true if strip has frames without content to render.

Definition at line 465 of file strip_time.cc.

References SEQ_time_has_left_still_frames(), and SEQ_time_has_right_still_frames().

◆ SEQ_time_left_handle_frame_get()

int SEQ_time_left_handle_frame_get ( const Scene * scene,
const Sequence * seq )

Get timeline frame where strip boundary starts.

Definition at line 501 of file strip_time.cc.

References Sequence::seq1, Sequence::seq2, Sequence::start, Sequence::startdisp, and Sequence::startofs.

Referenced by clickable_handle_size_get(), do_adjustment_impl(), draw_cache_stripe(), drawmeta_contents(), ED_sequencer_can_select_handle(), effect_input_get(), find_nearest_seq(), find_neighboring_sequence(), find_next_prev_sequence(), flushTransSeq(), get_default_fac_fade(), left_fake_key_frame_get(), mouse_over_key_get_from_strip(), mouseover_strips_sorted_get(), overlap_description_get(), query_lower_channel_strips(), query_right_side_strips(), realize_fake_keys(), realize_fake_keys_in_rect(), select_active_side(), select_active_side_range(), select_grouped_time_overlap(), select_linked_time_seq(), SEQ_add_reload_new_file(), seq_cache_cleanup_sequence(), seq_cache_free_temp_cache(), seq_cmp_time_startdisp_channel(), seq_disk_cache_invalidate(), seq_edit_split_intersect_check(), SEQ_edit_strip_split(), seq_effect_speed_rebuild_map(), seq_frame_apply_snap(), seq_meta_stack_alloc(), SEQ_proxy_rebuild(), seq_rectf(), seq_relations_check_depend(), SEQ_relations_check_scene_recursion(), SEQ_retiming_key_timeline_frame_set(), seq_snap_source_points_build_timeline(), seq_snap_target_points_build_timeline(), SEQ_sound_update_bounds(), seq_speed_effect_target_frame_get(), seq_time_effect_range_set(), SEQ_time_find_next_prev_edit(), SEQ_time_has_left_still_frames(), SEQ_time_right_handle_frame_set(), seq_time_slip_strip_ex(), SEQ_time_strip_intersects_frame(), SEQ_time_update_meta_strip_range(), SEQ_timeline_expand_boundbox(), seq_transform_handle_overwrite_split(), seq_transform_handle_overwrite_trim(), SEQ_transform_offset_after_frame(), SEQ_transform_seqbase_shuffle_ex(), SEQ_transform_test_overlap_seq_seq(), SEQ_transform_translate_sequence(), seq_update_meta_disp_range(), seq_view_collection_rect_timeline(), SeqToTransData(), SeqTransInfo(), sequence_handle_size_get_clamped(), sequencer_add_movie_multiple_strips(), sequencer_add_movie_sync_sound_strip(), sequencer_add_sound_multiple_strips(), sequencer_all_free_anim_ibufs(), sequencer_box_select_exec(), sequencer_clipboard_paste_exec(), sequencer_draw_get_transform_preview_frame(), sequencer_export_subtitles_exec(), sequencer_meta_make_exec(), sequencer_reassign_inputs_exec(), sequencer_retiming_box_select_exec(), sequencer_scene_frame_range_update_exec(), sequencer_select_linked_handle(), sequencer_select_side_exec(), sequencer_select_side_of_frame(), sequencer_select_side_of_frame_exec(), sequencer_separate_images_exec(), sequencer_set_range_to_strips_exec(), sequencer_slip_apply_limits(), sequencer_snap_exec(), sequencer_split_exec(), sequencer_visible_strips_get(), shuffle_seq_test_overlap(), shuffle_seq_time_offset_get(), strip_draw_context_get(), strip_start_screenspace_get(), strips_are_adjacent(), swap_sequence(), transform_seq_slide_cursor_get(), and versioning_convert_strip_speed_factor().

◆ SEQ_time_left_handle_frame_set()

◆ SEQ_time_media_playback_rate_factor_get()

◆ SEQ_time_right_handle_frame_get()

int SEQ_time_right_handle_frame_get ( const Scene * scene,
const Sequence * seq )

Get timeline frame where strip boundary ends.

Definition at line 510 of file strip_time.cc.

References Sequence::enddisp, Sequence::endofs, Sequence::seq1, Sequence::seq2, and SEQ_time_content_end_frame_get().

Referenced by clickable_handle_size_get(), do_adjustment_impl(), do_versions_sequencer_speed_effect_recursive(), draw_cache_stripe(), drawmeta_contents(), ED_sequencer_can_select_handle(), find_nearest_seq(), find_neighboring_sequence(), find_next_prev_sequence(), flushTransSeq(), mouse_over_key_get_from_strip(), mouseover_strips_sorted_get(), overlap_description_get(), query_lower_channel_strips(), realize_fake_keys(), realize_fake_keys_in_rect(), retiming_fake_key_frame_clicked(), right_fake_key_frame_get(), select_grouped_time_overlap(), select_linked_time_seq(), SEQ_add_reload_new_file(), seq_cache_cleanup_sequence(), seq_cache_free_temp_cache(), seq_disk_cache_invalidate(), seq_edit_split_intersect_check(), SEQ_edit_strip_split(), seq_effect_speed_rebuild_map(), seq_frame_apply_snap(), seq_get_text_strip_cb(), SEQ_give_frame_index(), seq_meta_stack_alloc(), SEQ_proxy_rebuild(), seq_rectf(), seq_relations_check_depend(), SEQ_retiming_key_timeline_frame_set(), seq_snap_source_points_build_timeline(), seq_snap_target_points_build_timeline(), SEQ_sound_update_bounds(), seq_speed_effect_target_frame_get(), seq_time_effect_range_set(), SEQ_time_find_next_prev_edit(), SEQ_time_has_right_still_frames(), SEQ_time_left_handle_frame_set(), seq_time_slip_strip_ex(), SEQ_time_strip_intersects_frame(), SEQ_time_update_meta_strip_range(), SEQ_timeline_expand_boundbox(), seq_transform_handle_overwrite_split(), seq_transform_handle_overwrite_trim(), SEQ_transform_seqbase_shuffle_ex(), SEQ_transform_test_overlap_seq_seq(), SEQ_transform_translate_sequence(), seq_update_meta_disp_range(), seq_view_collection_rect_timeline(), SeqToTransData(), SeqTransInfo(), sequence_handle_size_get_clamped(), sequencer_add_movie_multiple_strips(), sequencer_add_movie_sync_sound_strip(), sequencer_add_sound_multiple_strips(), sequencer_all_free_anim_ibufs(), sequencer_box_select_exec(), sequencer_draw_get_transform_preview_frame(), sequencer_export_subtitles_exec(), sequencer_generic_invoke_xy_guess_channel(), sequencer_meta_make_exec(), sequencer_retiming_box_select_exec(), sequencer_scene_frame_range_update_exec(), sequencer_select_side_of_frame(), sequencer_select_side_of_frame_exec(), sequencer_separate_images_exec(), sequencer_set_range_to_strips_exec(), sequencer_slip_apply_limits(), sequencer_split_exec(), sequencer_visible_strips_get(), shuffle_seq_test_overlap(), shuffle_seq_time_offset_get(), strip_draw_context_get(), strip_end_screenspace_get(), strips_are_adjacent(), swap_sequence(), and transform_seq_slide_cursor_get().

◆ SEQ_time_right_handle_frame_set()

◆ SEQ_time_sequence_get_fps()

float SEQ_time_sequence_get_fps ( Scene * scene,
Sequence * seq )

Get FPS rate of source media. Movie, scene and movie-clip strips are supported. Returns 0 for unsupported strip or if media can't be loaded.

Definition at line 323 of file strip_time.cc.

References StripAnim::anim, Sequence::anims, BKE_movieclip_get_fps(), BLI_listbase_is_empty(), Sequence::clip, ListBase::first, float, RenderData::frs_sec, RenderData::frs_sec_base, IMB_anim_get_fps(), Scene::r, Sequence::scene, seq_open_anim_file(), SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, and Sequence::type.

◆ SEQ_time_slip_strip()

void SEQ_time_slip_strip ( const Scene * scene,
Sequence * seq,
int delta,
float subframe_delta )

Move contents of a strip without moving the strip handles.

Definition at line 622 of file strip_time.cc.

References seq_time_slip_strip_ex().

Referenced by sequencer_slip_strips().

◆ SEQ_time_start_frame_get()

◆ SEQ_time_start_frame_set()

void SEQ_time_start_frame_set ( const Scene * scene,
Sequence * seq,
int timeline_frame )

Set frame where strip content starts. This function will also move strip handles.

Definition at line 488 of file strip_time.cc.

References seq_sequence_lookup_effects_by_seq(), seq_sequence_lookup_meta_by_seq(), seq_time_update_effects_strip_range(), SEQ_time_update_meta_strip_range(), and Sequence::start.

Referenced by SEQ_time_left_handle_frame_set().

◆ SEQ_time_strip_intersects_frame()

bool SEQ_time_strip_intersects_frame ( const Scene * scene,
const Sequence * seq,
int timeline_frame )

Test if strip intersects with timeline frame.

Note
This checks if strip would be rendered at this frame. For rendering it is assumed, that timeline frame has width of 1 frame and therefore ends at timeline_frame + 1
Parameters
seqSequence to be checked
timeline_frameabsolute frame position
Returns
true if strip intersects with timeline frame.

Definition at line 447 of file strip_time.cc.

References SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().

Referenced by query_strips_at_frame(), SEQ_get_topmost_sequence(), SEQ_relations_free_imbuf(), sequencer_all_free_anim_ibufs(), sequencer_select_side_of_frame_exec(), skip_modifier(), and strip_exists_at_frame().

◆ SEQ_time_strip_length_get()

◆ SEQ_time_update_meta_strip_range()

◆ SEQ_timeline_boundbox()

void SEQ_timeline_boundbox ( const Scene * scene,
const ListBase * seqbase,
rctf * r_rect )

Define boundary rectangle of sequencer timeline and fill in rect data

Parameters
sceneScene in which strips are located
seqbaseListBase in which strips are located
rectdata structure describing rectangle, that will be filled in by this function

Definition at line 384 of file strip_time.cc.

References SEQ_timeline_expand_boundbox(), and SEQ_timeline_init_boundbox().

Referenced by draw_timeline_seq_display(), seq_time_gap_info_get(), and seq_view_collection_rect_timeline().

◆ SEQ_timeline_expand_boundbox()

void SEQ_timeline_expand_boundbox ( const Scene * scene,
const ListBase * seqbase,
rctf * rect )

Stretch the given rectangle to include the given strips boundaries

Parameters
seqbaseListBase in which strips are located
rectoutput parameter to be filled with strips' boundaries

Definition at line 364 of file strip_time.cc.

References LISTBASE_FOREACH, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), rctf::xmax, rctf::xmin, and rctf::ymax.

Referenced by displayed_channel_range_get(), SEQ_timeline_boundbox(), sequencer_main_clamp_view(), and sequencer_view_all_exec().

◆ SEQ_timeline_init_boundbox()

void SEQ_timeline_init_boundbox ( const Scene * scene,
rctf * r_rect )

Initialize given rectangle with the Scene's timeline boundaries.

Parameters
scenethe Scene instance whose timeline boundaries are extracted from
rectoutput parameter to be filled with timeline boundaries

Definition at line 356 of file strip_time.cc.

References rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.

Referenced by SEQ_timeline_boundbox(), sequencer_main_clamp_view(), and sequencer_view_all_exec().