Blender V4.3
SEQ_add.hh File Reference
#include "BLI_utildefines.h"
#include "DNA_scene_enums.h"

Go to the source code of this file.

Classes

struct  SeqLoadData
 

Enumerations

enum  eSeqLoadFlags { SEQ_LOAD_SOUND_CACHE = (1 << 1) , SEQ_LOAD_SOUND_MONO = (1 << 2) , SEQ_LOAD_MOVIE_SYNC_FPS = (1 << 3) , SEQ_LOAD_SET_VIEW_TRANSFORM = (1 << 4) }
 

Functions

void SEQ_add_load_data_init (SeqLoadData *load_data, const char *name, const char *path, int start_frame, int channel)
 
SequenceSEQ_add_image_strip (Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_sound_strip (Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
void SEQ_add_sound_av_sync (Main *bmain, Scene *scene, Sequence *seq, SeqLoadData *load_data)
 
SequenceSEQ_add_meta_strip (Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_movie_strip (Main *bmain, Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_scene_strip (Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_movieclip_strip (Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_mask_strip (Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
SequenceSEQ_add_effect_strip (Scene *scene, ListBase *seqbase, SeqLoadData *load_data)
 
void SEQ_add_image_set_directory (Sequence *seq, const char *dirpath)
 
void SEQ_add_image_load_file (Scene *scene, Sequence *seq, size_t strip_frame, const char *filename)
 
void SEQ_add_image_init_alpha_mode (Sequence *seq)
 
void SEQ_add_reload_new_file (Main *bmain, Scene *scene, Sequence *seq, bool lock_range)
 
void SEQ_add_movie_reload_if_needed (Main *bmain, Scene *scene, Sequence *seq, bool *r_was_reloaded, bool *r_can_produce_frames)
 

Enumeration Type Documentation

◆ eSeqLoadFlags

SeqLoadData.flags

Enumerator
SEQ_LOAD_SOUND_CACHE 
SEQ_LOAD_SOUND_MONO 
SEQ_LOAD_MOVIE_SYNC_FPS 
SEQ_LOAD_SET_VIEW_TRANSFORM 

Definition at line 24 of file SEQ_add.hh.

Function Documentation

◆ SEQ_add_effect_strip()

◆ SEQ_add_image_init_alpha_mode()

◆ SEQ_add_image_load_file()

void SEQ_add_image_load_file ( Scene * scene,
Sequence * seq,
size_t strip_frame,
const char * filename )

Set directory used by image strip.

Parameters
seqimage strip to be changed
strip_frameframe index of strip to be changed
filenameimage filename (only filename, not complete path)

Definition at line 193 of file strip_add.cc.

References StripElem::filename, SEQ_render_give_stripelem(), SEQ_time_start_frame_get(), and STRNCPY.

Referenced by sequencer_add_image_strip_load_files().

◆ SEQ_add_image_set_directory()

void SEQ_add_image_set_directory ( Sequence * seq,
const char * dirpath )

Set directory used by image strip.

Parameters
seqimage strip to be changed
pathdirectory path

Definition at line 188 of file strip_add.cc.

References Strip::dirpath, Sequence::strip, and STRNCPY.

Referenced by sequencer_add_image_strip_load_files().

◆ SEQ_add_image_strip()

◆ SEQ_add_load_data_init()

void SEQ_add_load_data_init ( SeqLoadData * load_data,
const char * name,
const char * path,
int start_frame,
int channel )

Initialize common SeqLoadData members

Parameters
load_dataSeqLoadData to be initialized
namestrip name (can be NULL)
pathpath to file that is used as strip input (can be NULL)
start_frametimeline frame where strip will be created
channeltimeline channel where strip will be created

Definition at line 56 of file strip_add.cc.

References SeqLoadData::channel, SeqLoadData::name, SeqLoadData::path, SeqLoadData::start_frame, and STRNCPY.

◆ SEQ_add_mask_strip()

Sequence * SEQ_add_mask_strip ( Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add mask strip.

Parameters
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 148 of file strip_add.cc.

References BKE_mask_get_duration(), SeqLoadData::channel, id_us_ensure_real(), Sequence::len, SeqLoadData::mask, Sequence::mask, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_MASK, and SeqLoadData::start_frame.

Referenced by sequencer_add_mask_strip_exec().

◆ SEQ_add_meta_strip()

Sequence * SEQ_add_meta_strip ( Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add meta strip.

Parameters
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 373 of file strip_add.cc.

References SeqLoadData::channel, Sequence::len, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_META, Sequence::start, and SeqLoadData::start_frame.

◆ SEQ_add_movie_reload_if_needed()

void SEQ_add_movie_reload_if_needed ( Main * bmain,
Scene * scene,
Sequence * seq,
bool * r_was_reloaded,
bool * r_can_produce_frames )

◆ SEQ_add_movie_strip()

Sequence * SEQ_add_movie_strip ( Main * bmain,
Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add movie strip.

Parameters
bmainMain reference
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 391 of file strip_add.cc.

References SeqLoadData::adjust_playback_rate, SeqLoadData::allow_invalid_file, StripAnim::anim, Sequence::anims, BKE_main_blendfile_path(), BKE_scene_multiview_view_prefix_get(), BLI_addtail(), BLI_path_abs(), BLI_path_split_dir_file(), SeqLoadData::channel, Strip::colorspace_settings, DEG_id_tag_update(), Strip::dirpath, FILE_MAX, StripElem::filename, SeqLoadData::fit_method, Sequence::flag, SeqLoadData::flags, float, IB_rect, ID_RECALC_AUDIO_FPS, ID_RECALC_SEQUENCER_STRIPS, IMB_anim_get_duration(), IMB_anim_get_fps(), IMB_anim_get_image_height(), IMB_anim_get_image_width(), IMB_anim_load_metadata(), IMB_TC_RECORD_RUN, IMD_anim_get_offset(), Sequence::len, Sequence::media_playback_rate, MEM_callocN, MEM_freeN(), MEM_mallocN, ColorManagedColorspaceSettings::name, openanim(), StripElem::orig_fps, StripElem::orig_height, StripElem::orig_width, SeqLoadData::path, R_IMF_VIEWS_INDIVIDUAL, SeqLoadData::r_video_stream_start, seq_add_generic_update(), seq_add_set_name(), seq_add_set_view_transform(), seq_anim_add_suffix(), SEQ_AUTO_PLAYBACK_RATE, SEQ_LOAD_MOVIE_SYNC_FPS, seq_multiview_name(), seq_num_files(), SEQ_sequence_alloc(), SEQ_set_scale_to_fit(), SEQ_TYPE_MOVIE, SEQ_USE_VIEWS, SeqLoadData::start_frame, SeqLoadData::stereo3d_format, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, STRNCPY, SeqLoadData::use_multiview, SeqLoadData::views_format, and Sequence::views_format.

Referenced by sequencer_add_movie_multiple_strips(), and sequencer_add_movie_single_strip().

◆ SEQ_add_movieclip_strip()

Sequence * SEQ_add_movieclip_strip ( Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add movieclip strip.

Parameters
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 136 of file strip_add.cc.

References BKE_movieclip_get_duration(), SeqLoadData::channel, SeqLoadData::clip, Sequence::clip, id_us_ensure_real(), Sequence::len, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_MOVIECLIP, and SeqLoadData::start_frame.

Referenced by sequencer_add_movieclip_strip_exec().

◆ SEQ_add_reload_new_file()

void SEQ_add_reload_new_file ( Main * bmain,
Scene * scene,
Sequence * seq,
bool lock_range )

Definition at line 525 of file strip_add.cc.

References StripAnim::anim, Sequence::anim_endofs, Sequence::anim_startofs, Sequence::anims, BKE_main_blendfile_path_from_global(), BKE_mask_get_duration(), BKE_movieclip_get_duration(), BKE_scene_multiview_view_prefix_get(), BKE_sound_get_length(), BLI_addtail(), BLI_path_abs(), BLI_path_join, ceil(), Sequence::clip, Strip::colorspace_settings, Strip::dirpath, RenderData::efra, ELEM, FILE_MAX, StripElem::filename, ListBase::first, Sequence::flag, FPS, free_proxy_seq(), IB_animdeinterlace, IB_rect, IMB_anim_get_duration(), IMB_anim_load_metadata(), IMB_TC_RECORD_RUN, Sequence::len, Sequence::mask, MEM_allocN_len, MEM_mallocN, ColorManagedColorspaceSettings::name, openanim(), Strip::proxy, Scene::r, R_IMF_VIEWS_INDIVIDUAL, R_MULTIVIEW, Sequence::scene, seq_anim_add_suffix(), SEQ_FILTERY, seq_multiview_name(), seq_num_files(), SEQ_relations_invalidate_cache_raw(), SEQ_relations_sequence_free_anim(), SEQ_time_left_handle_frame_get(), SEQ_time_left_handle_frame_set(), SEQ_time_right_handle_frame_get(), SEQ_time_right_handle_frame_set(), SEQ_TYPE_IMAGE, SEQ_TYPE_MASK, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, SEQ_USE_VIEWS, RenderData::sfra, Sequence::sound, Sequence::streamindex, Sequence::strip, Strip::stripdata, StripProxy::tc, Sequence::type, UNUSED_VARS, and Sequence::views_format.

Referenced by SEQ_add_movie_reload_if_needed(), seq_split_set_left_hold_offset(), seq_split_set_right_hold_offset(), sequencer_change_path_exec(), and sequencer_reload_exec().

◆ SEQ_add_scene_strip()

Sequence * SEQ_add_scene_strip ( Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add scene strip.

Parameters
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 124 of file strip_add.cc.

References SeqLoadData::channel, RenderData::efra, id_us_ensure_real(), Sequence::len, Scene::r, SeqLoadData::scene, Sequence::scene, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_SCENE, RenderData::sfra, and SeqLoadData::start_frame.

Referenced by sequencer_add_scene_strip_exec(), and sequencer_add_scene_strip_new_exec().

◆ SEQ_add_sound_av_sync()

void SEQ_add_sound_av_sync ( Main * bmain,
Scene * scene,
Sequence * seq,
SeqLoadData * load_data )

Sync up the sound strip 'seq' with the video data in 'load_data'. This is intended to be used after adding a movie strip and you want to make sure that the audio track is properly synced up with the video.

Parameters
bmainMain reference
sceneScene where the sound strip is located
seqThe sound strip that will be synced
load_dataSeqLoadData with information necessary to sync the sound strip

Definition at line 357 of file strip_add.cc.

Referenced by sequencer_add_movie_sync_sound_strip().

◆ SEQ_add_sound_strip()

Sequence * SEQ_add_sound_strip ( Main * bmain,
Scene * scene,
ListBase * seqbase,
SeqLoadData * load_data )

Add sound strip.

Note
Use SEQ_add_image_set_directory() and SEQ_add_image_load_file() to load image sequences
Parameters
bmainMain reference
sceneScene where strips will be added
seqbaseListBase where strips will be added
load_dataSeqLoadData with information necessary to create strip
Returns
created strip

Definition at line 364 of file strip_add.cc.

Referenced by sequencer_add_movie_multiple_strips(), sequencer_add_movie_single_strip(), sequencer_add_sound_multiple_strips(), and sequencer_add_sound_single_strip().