|
Blender
V2.93
|
#include <math.h>#include <string.h>#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_util.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BKE_context.h"#include "BKE_image.h"#include "BKE_lib_id.h"#include "BKE_main.h"#include "BKE_mask.h"#include "BKE_movieclip.h"#include "BKE_scene.h"#include "BKE_sound.h"#include "DEG_depsgraph_query.h"#include "IMB_colormanagement.h"#include "IMB_imbuf.h"#include "IMB_imbuf_types.h"#include "IMB_metadata.h"#include "SEQ_add.h"#include "SEQ_effects.h"#include "SEQ_relations.h"#include "SEQ_render.h"#include "SEQ_select.h"#include "SEQ_sequencer.h"#include "SEQ_time.h"#include "SEQ_transform.h"#include "SEQ_utils.h"#include "multiview.h"#include "proxy.h"#include "utils.h"Go to the source code of this file.
| Sequence* SEQ_add_effect_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| struct 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 221 of file strip_add.c.
References Sequence::blend_mode, SeqLoadData::channel, SeqLoadData::effect, SeqLoadData::end_frame, Sequence::flag, SeqEffectHandle::init, Sequence::len, scene, Sequence::seq1, SeqLoadData::seq1, Sequence::seq2, SeqLoadData::seq2, Sequence::seq3, SeqLoadData::seq3, seq_add_generic_update(), seq_add_set_name(), SEQ_effect_get_num_inputs(), SEQ_effect_handle_get(), SEQ_relations_update_changed_seq_and_deps(), SEQ_sequence_alloc(), SEQ_transform_set_right_handle_frame(), SEQ_TYPE_ADJUSTMENT, SEQ_TYPE_ALPHAOVER, SEQ_TYPE_COLOR, SEQ_TYPE_CROSS, SEQ_TYPE_TEXT, SEQ_USE_EFFECT_DEFAULT_FADE, SeqLoadData::start_frame, Sequence::type, and SeqLoadData::type.
Referenced by sequencer_add_effect_strip_exec().
|
static |
Definition at line 99 of file strip_add.c.
References Scene::ed, scene, SEQ_relations_invalidate_cache_composite(), SEQ_sequence_base_unique_name_recursive(), SEQ_sort(), SEQ_time_update_sequence_bounds(), and Editing::seqbase.
Referenced by SEQ_add_effect_strip(), SEQ_add_image_strip(), SEQ_add_mask_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 287 of file strip_add.c.
References Sequence::alpha_mode, BKE_main_blendfile_path_from_global(), BLI_join_dirfile(), BLI_path_abs(), Strip::colorspace_settings, Strip::dir, FILE_MAX, ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IB_test, IMA_ALPHA_PREMUL, IMB_freeImBuf(), IMB_loadiffname(), StripElem::name, 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 | ( | Sequence * | seq, |
| size_t | strip_frame, | ||
| 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 276 of file strip_add.c.
References BLI_strncpy(), StripElem::name, SEQ_render_give_stripelem(), and Sequence::start.
Referenced by sequencer_add_image_strip_load_files().
| void SEQ_add_image_set_directory | ( | Sequence * | seq, |
| char * | path | ||
| ) |
Set directory used by image strip.
| seq | image strip to be changed |
| path | directory path |
Definition at line 264 of file strip_add.c.
References BLI_strncpy(), Strip::dir, and Sequence::strip.
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. NOTE: Use SEQ_add_image_set_directory() and SEQ_add_image_load_file() to load image sequences
| main | 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 326 of file strip_add.c.
References Editing::act_imagedir, BKE_main_blendfile_path(), Sequence::blend_mode, BLI_path_abs(), BLI_strncpy(), SeqLoadData::channel, Strip::colorspace_settings, Strip::dir, Scene::ed, FILE_MAX, SeqLoadData::fit_method, Sequence::flag, IB_rect, SeqLoadData::image, IMB_freeImBuf(), IMB_loadiffname(), Sequence::len, SeqLoadData::len, MEM_callocN, ColorManagedColorspaceSettings::name, NULL, StripElem::orig_height, StripElem::orig_width, SeqLoadData::path, Scene::r, scene, seq_add_generic_update(), seq_add_set_name(), seq_add_set_view_transform(), SEQ_sequence_alloc(), SEQ_set_scale_to_fit(), SEQ_TYPE_CROSS, SEQ_TYPE_IMAGE, SEQ_USE_VIEWS, SeqLoadData::start_frame, Sequence::stereo3d_format, SeqLoadData::stereo3d_format, Sequence::strip, Strip::stripdata, SeqLoadData::use_multiview, Sequence::views_format, SeqLoadData::views_format, ImBuf::x, RenderData::xsch, ImBuf::y, and RenderData::ysch.
Referenced by sequencer_add_image_strip_exec().
| void SEQ_add_load_data_init | ( | SeqLoadData * | load_data, |
| const char * | name, | ||
| const char * | path, | ||
| const int | start_frame, | ||
| const 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 82 of file strip_add.c.
References BLI_strncpy(), SeqLoadData::channel, SeqLoadData::name, NULL, SeqLoadData::path, and SeqLoadData::start_frame.
| Sequence* SEQ_add_mask_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| struct 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 200 of file strip_add.c.
References BKE_mask_get_duration(), Sequence::blend_mode, SeqLoadData::channel, id_us_ensure_real(), Sequence::len, Sequence::mask, SeqLoadData::mask, scene, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_CROSS, 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 482 of file strip_add.c.
References SeqLoadData::channel, Sequence::len, scene, seq_add_set_name(), SEQ_sequence_alloc(), SEQ_time_update_sequence(), SEQ_TYPE_META, Sequence::start, and SeqLoadData::start_frame.
| void SEQ_add_movie_reload_if_needed | ( | struct Main * | bmain, |
| struct Scene * | scene, | ||
| struct Sequence * | seq, | ||
| bool * | r_was_reloaded, | ||
| bool * | r_can_produce_frames | ||
| ) |
Definition at line 795 of file strip_add.c.
References Sequence::anims, BLI_assert, BLI_listbase_is_empty(), IMB_anim_can_produce_frames(), LISTBASE_FOREACH, scene, 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, | ||
| double * | r_video_start_offset | ||
| ) |
Add movie strip.
| main | 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 508 of file strip_add.c.
References SeqLoadData::allow_invalid_file, StripAnim::anim, Sequence::anims, BKE_main_blendfile_path(), BKE_scene_multiview_view_prefix_get(), Sequence::blend_mode, BLI_addtail(), BLI_path_abs(), BLI_split_dirfile(), BLI_strncpy(), SeqLoadData::channel, anim::colorspace, Strip::colorspace_settings, Strip::dir, FILE_MAX, SeqLoadData::fit_method, Sequence::flag, SeqLoadData::flags, RenderData::frs_sec, RenderData::frs_sec_base, IB_rect, 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, MAX2, MEM_callocN, MEM_freeN, MEM_mallocN, StripElem::name, ColorManagedColorspaceSettings::name, NULL, openanim(), StripElem::orig_height, StripElem::orig_width, SeqLoadData::path, Scene::r, R_IMF_VIEWS_INDIVIDUAL, scene, seq_add_generic_update(), seq_add_set_name(), seq_add_set_view_transform(), seq_anim_add_suffix(), SEQ_LOAD_MOVIE_SYNC_FPS, seq_multiview_name(), seq_num_files(), SEQ_sequence_alloc(), SEQ_set_scale_to_fit(), SEQ_TYPE_CROSS, SEQ_TYPE_MOVIE, SEQ_USE_VIEWS, SeqLoadData::start_frame, Sequence::stereo3d_format, SeqLoadData::stereo3d_format, str, Sequence::strip, Strip::stripdata, SeqLoadData::use_multiview, Sequence::views_format, SeqLoadData::views_format, RenderData::xsch, and RenderData::ysch.
Referenced by sequencer_add_movie_multiple_strips(), and sequencer_add_movie_single_strip().
| Sequence* SEQ_add_movieclip_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| struct 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 179 of file strip_add.c.
References BKE_movieclip_get_duration(), Sequence::blend_mode, SeqLoadData::channel, Sequence::clip, SeqLoadData::clip, id_us_ensure_real(), Sequence::len, scene, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_CROSS, SEQ_TYPE_MOVIECLIP, and SeqLoadData::start_frame.
Referenced by sequencer_add_movieclip_strip_exec().
Definition at line 623 of file strip_add.c.
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_join_dirfile(), BLI_path_abs(), ceil(), Sequence::clip, Strip::colorspace_settings, Strip::dir, RenderData::efra, ELEM, Sequence::enddisp, FILE_MAX, ListBase::first, Sequence::flag, FPS, free_proxy_seq(), IB_animdeinterlace, IB_rect, if(), IMB_anim_get_duration(), IMB_anim_load_metadata(), IMB_TC_RECORD_RUN, Sequence::len, Sequence::mask, MEM_allocN_len, MEM_mallocN, StripElem::name, ColorManagedColorspaceSettings::name, NULL, openanim(), Strip::proxy, Scene::r, R_IMF_VIEWS_INDIVIDUAL, R_MULTIVIEW, RenderData::scemode, scene, Sequence::scene, seq_anim_add_suffix(), SEQ_FILTERY, seq_multiview_name(), seq_num_files(), SEQ_relations_sequence_free_anim(), SEQ_time_update_sequence(), SEQ_time_update_sequence_bounds(), SEQ_transform_fix_single_image_seq_offsets(), SEQ_transform_set_left_handle_frame(), SEQ_transform_set_right_handle_frame(), 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::startdisp, str, 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_edit_strip_split(), sequencer_change_path_exec(), sequencer_reload_exec(), and sequencer_slip_modal().
| Sequence* SEQ_add_scene_strip | ( | Scene * | scene, |
| ListBase * | seqbase, | ||
| struct 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 158 of file strip_add.c.
References Sequence::blend_mode, SeqLoadData::channel, RenderData::efra, id_us_ensure_real(), Sequence::len, Scene::r, scene, Sequence::scene, SeqLoadData::scene, seq_add_generic_update(), seq_add_set_name(), SEQ_sequence_alloc(), SEQ_TYPE_CROSS, SEQ_TYPE_SCENE, RenderData::sfra, and SeqLoadData::start_frame.
Referenced by sequencer_add_scene_strip_exec().
|
static |
Definition at line 107 of file strip_add.c.
References BLI_strncpy(), BLI_strncpy_utf8(), BLI_utf8_invalid_strip(), SeqLoadData::clip, Mask::id, MovieClip::id, Scene::id, SeqLoadData::mask, Sequence::name, SeqLoadData::name, ID::name, SeqLoadData::scene, 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 132 of file strip_add.c.
References COLOR_ROLE_DEFAULT_BYTE, Strip::colorspace_settings, ColorManagedDisplaySettings::display_device, Scene::display_settings, SeqLoadData::flags, IMB_colormanagement_display_get_default_view_transform_name(), IMB_colormanagement_display_get_named(), IMB_colormanagement_role_colorspace_name_get(), ColorManagedColorspaceSettings::name, scene, SEQ_LOAD_SET_VIEW_TRANSFORM, STREQ, Sequence::strip, STRNCPY, Scene::view_settings, and ColorManagedViewSettings::view_transform.
Referenced by SEQ_add_image_strip(), and SEQ_add_movie_strip().
| Sequence* SEQ_add_sound_strip | ( | Main * | UNUSEDbmain, |
| Scene * | UNUSEDscene, | ||
| ListBase * | UNUSEDseqbase, | ||
| SeqLoadData * | UNUSEDload_data, | ||
| const double | UNUSEDaudio_offset | ||
| ) |
Definition at line 463 of file strip_add.c.
References NULL.
Referenced by sequencer_add_movie_multiple_strips(), sequencer_add_movie_single_strip(), sequencer_add_sound_multiple_strips(), and sequencer_add_sound_single_strip().