|
Blender V4.3
|
#include <algorithm>#include <cmath>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_mask_types.h"#include "DNA_scene_types.h"#include "DNA_sequence_types.h"#include "DNA_sound_types.h"#include "BLI_listbase.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BKE_image.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_mask.h"#include "BKE_movieclip.h"#include "BKE_scene.hh"#include "BKE_sound.h"#include "DEG_depsgraph_query.hh"#include "IMB_colormanagement.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_metadata.hh"#include "SEQ_add.hh"#include "SEQ_edit.hh"#include "SEQ_effects.hh"#include "SEQ_relations.hh"#include "SEQ_render.hh"#include "SEQ_sequencer.hh"#include "SEQ_time.hh"#include "SEQ_transform.hh"#include "SEQ_utils.hh"#include "multiview.hh"#include "proxy.hh"#include "sequencer.hh"#include "strip_time.hh"Go to the source code of this file.
| Sequence * SEQ_add_effect_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add effect strip.
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create strip |
Definition at line 160 of file strip_add.cc.
References Sequence::blend_mode, Sequence::blend_opacity, SeqLoadData::channel, SeqLoadData::effect, SeqLoadData::end_frame, Sequence::flag, SeqEffectHandle::init, Sequence::len, SeqLoadData::seq1, Sequence::seq1, SeqLoadData::seq2, Sequence::seq2, seq_add_generic_update(), seq_add_set_name(), SEQ_effect_get_num_inputs(), SEQ_effect_handle_get(), SEQ_sequence_alloc(), SEQ_SINGLE_FRAME_CONTENT, SEQ_time_right_handle_frame_set(), SEQ_USE_EFFECT_DEFAULT_FADE, SeqLoadData::start_frame, SeqLoadData::type, and Sequence::type.
Referenced by sequencer_add_effect_strip_exec().
Definition at line 73 of file strip_add.cc.
References SEQ_relations_invalidate_cache_composite(), SEQ_sequence_base_unique_name_recursive(), SEQ_sequence_lookup_invalidate(), seq_sequence_lookup_meta_by_seq(), seq_time_effect_range_set(), and SEQ_time_update_meta_strip_range().
Referenced by SEQ_add_effect_strip(), SEQ_add_image_strip(), SEQ_add_mask_strip(), SEQ_add_meta_strip(), SEQ_add_movie_strip(), SEQ_add_movieclip_strip(), and SEQ_add_scene_strip().
| void SEQ_add_image_init_alpha_mode | ( | Sequence * | seq | ) |
Set image strip alpha mode
| seq | image strip to be changed |
Definition at line 200 of file strip_add.cc.
References Sequence::alpha_mode, BKE_main_blendfile_path_from_global(), BLI_path_abs(), BLI_path_join, Strip::colorspace_settings, Strip::dirpath, FILE_MAX, StripElem::filename, ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IB_test, IMA_ALPHA_PREMUL, IMB_freeImBuf(), IMB_loadiffname(), ColorManagedColorspaceSettings::name, SEQ_ALPHA_STRAIGHT, SEQ_TYPE_IMAGE, Sequence::strip, Strip::stripdata, and Sequence::type.
Referenced by sequencer_add_image_strip_exec().
| void SEQ_add_image_load_file | ( | Scene * | scene, |
| Sequence * | seq, | ||
| size_t | strip_frame, | ||
| const char * | filename ) |
Set directory used by image strip.
| seq | image strip to be changed |
| strip_frame | frame index of strip to be changed |
| filename | image 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().
| void SEQ_add_image_set_directory | ( | Sequence * | seq, |
| const char * | dirpath ) |
Set directory used by image strip.
| seq | image strip to be changed |
| path | directory 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().
| Sequence * SEQ_add_image_strip | ( | Main * | bmain, |
| Scene * | scene, | ||
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add image strip.
| bmain | Main reference |
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create strip |
Definition at line 230 of file strip_add.cc.
References BKE_main_blendfile_path(), BLI_path_abs(), SeqLoadData::channel, Strip::colorspace_settings, Strip::dirpath, FILE_MAX, SeqLoadData::fit_method, Sequence::flag, IB_rect, SeqLoadData::image, IMB_freeImBuf(), IMB_loadiffname(), SeqLoadData::len, Sequence::len, MEM_callocN, ColorManagedColorspaceSettings::name, StripElem::orig_height, StripElem::orig_width, SeqLoadData::path, seq_add_generic_update(), seq_add_set_name(), seq_add_set_view_transform(), SEQ_sequence_alloc(), SEQ_set_scale_to_fit(), SEQ_SINGLE_FRAME_CONTENT, SEQ_TYPE_IMAGE, SEQ_USE_VIEWS, SeqLoadData::start_frame, SeqLoadData::stereo3d_format, Sequence::stereo3d_format, Sequence::strip, Strip::stripdata, STRNCPY, SeqLoadData::use_multiview, SeqLoadData::views_format, Sequence::views_format, ImBuf::x, and ImBuf::y.
Referenced by sequencer_add_image_strip_exec().
| void SEQ_add_load_data_init | ( | SeqLoadData * | load_data, |
| const char * | name, | ||
| const char * | path, | ||
| int | start_frame, | ||
| int | channel ) |
Initialize common SeqLoadData members
| load_data | SeqLoadData to be initialized |
| name | strip name (can be NULL) |
| path | path to file that is used as strip input (can be NULL) |
| start_frame | timeline frame where strip will be created |
| channel | timeline 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.
| Sequence * SEQ_add_mask_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add mask strip.
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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().
| Sequence * SEQ_add_meta_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add meta strip.
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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.
| void SEQ_add_movie_reload_if_needed | ( | Main * | bmain, |
| Scene * | scene, | ||
| Sequence * | seq, | ||
| bool * | r_was_reloaded, | ||
| bool * | r_can_produce_frames ) |
Definition at line 699 of file strip_add.cc.
References Sequence::anims, BLI_assert_msg, BLI_listbase_is_empty(), IMB_anim_can_produce_frames(), LISTBASE_FOREACH, SEQ_add_reload_new_file(), SEQ_TYPE_MOVIE, and Sequence::type.
| Sequence * SEQ_add_movie_strip | ( | Main * | bmain, |
| Scene * | scene, | ||
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add movie strip.
| bmain | Main reference |
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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().
| Sequence * SEQ_add_movieclip_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add movieclip strip.
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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().
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().
| Sequence * SEQ_add_scene_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add scene strip.
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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().
|
static |
Definition at line 82 of file strip_add.cc.
References SeqLoadData::clip, Mask::id, MovieClip::id, Scene::id, SeqLoadData::mask, ID::name, SeqLoadData::name, SeqLoadData::scene, SEQ_edit_sequence_name_set(), SEQ_sequence_give_name(), SEQ_TYPE_EFFECT, SEQ_TYPE_MASK, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, and Sequence::type.
Referenced by SEQ_add_effect_strip(), SEQ_add_image_strip(), SEQ_add_mask_strip(), SEQ_add_meta_strip(), SEQ_add_movie_strip(), SEQ_add_movieclip_strip(), and SEQ_add_scene_strip().
|
static |
Definition at line 106 of file strip_add.cc.
References COLOR_ROLE_DEFAULT_BYTE, Strip::colorspace_settings, SeqLoadData::flags, IMB_colormanagement_display_get_default_view_transform_name(), IMB_colormanagement_display_get_named(), IMB_colormanagement_role_colorspace_name_get(), ColorManagedColorspaceSettings::name, SEQ_LOAD_SET_VIEW_TRANSFORM, STREQ, Sequence::strip, and STRNCPY.
Referenced by SEQ_add_image_strip(), and SEQ_add_movie_strip().
| 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.
| bmain | Main reference |
| scene | Scene where the sound strip is located |
| seq | The sound strip that will be synced |
| load_data | SeqLoadData 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().
| Sequence * SEQ_add_sound_strip | ( | Main * | bmain, |
| Scene * | scene, | ||
| ListBase * | seqbase, | ||
| SeqLoadData * | load_data ) |
Add sound strip.
| bmain | Main reference |
| scene | Scene where strips will be added |
| seqbase | ListBase where strips will be added |
| load_data | SeqLoadData with information necessary to create 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().