|
Blender V4.3
|
#include <algorithm>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_scene_types.h"#include "DNA_sequence_types.h"#include "BLI_blenlib.h"#include "BLI_vector_set.hh"#include "BLT_translation.hh"#include "BKE_animsys.h"#include "BKE_image.hh"#include "BKE_main.hh"#include "BKE_scene.hh"#include "SEQ_channels.hh"#include "SEQ_edit.hh"#include "SEQ_iterator.hh"#include "SEQ_relations.hh"#include "SEQ_render.hh"#include "SEQ_select.hh"#include "SEQ_sequencer.hh"#include "SEQ_time.hh"#include "SEQ_utils.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "multiview.hh"#include "proxy.hh"#include "sequencer.hh"#include "utils.hh"Go to the source code of this file.
Classes | |
| struct | SeqUniqueInfo |
|
static |
Definition at line 106 of file sequencer/intern/utils.cc.
References BLT_I18NCONTEXT_ID_SEQUENCE, CTX_DATA_, SEQ_TYPE_ADD, SEQ_TYPE_ADJUSTMENT, SEQ_TYPE_ALPHAOVER, SEQ_TYPE_ALPHAUNDER, SEQ_TYPE_COLOR, SEQ_TYPE_COLORMIX, SEQ_TYPE_CROSS, SEQ_TYPE_GAMCROSS, SEQ_TYPE_GAUSSIAN_BLUR, SEQ_TYPE_GLOW, SEQ_TYPE_IMAGE, SEQ_TYPE_MASK, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_MUL, SEQ_TYPE_MULTICAM, SEQ_TYPE_OVERDROP, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SPEED, SEQ_TYPE_SUB, SEQ_TYPE_TEXT, SEQ_TYPE_TRANSFORM, and SEQ_TYPE_WIPE.
Referenced by SEQ_sequence_give_name().
Definition at line 249 of file sequencer/intern/utils.cc.
References StripAnim::anim, FILE_MAX, proxy_dir_get(), seq_proxy_index_dir_set(), and use_proxy().
Referenced by open_anim_file_multiview(), and seq_open_anim_file().
|
static |
Definition at line 260 of file sequencer/intern/utils.cc.
References StripAnim::anim, Sequence::anims, BKE_scene_multiview_view_id_suffix_get(), BKE_scene_multiview_view_prefix_get(), BLI_addtail(), FILE_MAX, IMB_suffix_anim(), index_dir_set(), MEM_mallocN, open_anim_filepath(), R_IMF_VIEWS_INDIVIDUAL, seq_num_files(), SEQ_relations_sequence_free_anim(), SNPRINTF, and Sequence::views_format.
Referenced by seq_open_anim_file().
|
static |
Definition at line 205 of file sequencer/intern/utils.cc.
References StripAnim::anim, Strip::colorspace_settings, Sequence::flag, IB_animdeinterlace, IB_rect, ColorManagedColorspaceSettings::name, openanim(), openanim_noload(), SEQ_FILTERY, Sequence::streamindex, and Sequence::strip.
Referenced by open_anim_file_multiview(), and seq_open_anim_file().
|
static |
Definition at line 231 of file sequencer/intern/utils.cc.
References BKE_main_blendfile_path_from_global(), BLI_path_abs(), BLI_strncpy(), StripProxy::dirpath, Strip::proxy, Editing::proxy_dir, Editing::proxy_storage, SEQ_EDIT_PROXY_DIR_STORAGE, Sequence::strip, and use_proxy().
Referenced by index_dir_set().
Definition at line 416 of file sequencer/intern/utils.cc.
References Sequence::mask, SEQ_select_active_get(), SEQ_TYPE_MASK, and Sequence::type.
Referenced by ED_space_sequencer_check_show_maskedit(), and sequencer_context().
| void SEQ_alpha_mode_from_file_extension | ( | Sequence * | seq | ) |
Definition at line 427 of file sequencer/intern/utils.cc.
References Sequence::alpha_mode, BKE_image_alpha_mode_from_extension_ex(), StripElem::filename, Sequence::strip, and Strip::stripdata.
Referenced by seq_set_alpha_mode_cb().
Ensure, that provided Sequence has unique name. If animation data exists for this Sequence, it will be duplicated and mapped onto new name
| seq | Sequence which name will be ensured to be unique |
| scene | Scene in which name must be unique |
Definition at line 497 of file sequencer/intern/utils.cc.
References BKE_animdata_fix_paths_rename(), LISTBASE_FOREACH, Sequence::name, SEQ_ensure_unique_name(), SEQ_NAME_MAXSTR, SEQ_sequence_base_unique_name_recursive(), SEQ_TYPE_META, Sequence::seqbase, STRNCPY_UTF8, and Sequence::type.
Referenced by SEQ_edit_strip_split(), SEQ_ensure_unique_name(), sequencer_add_duplicate_exec(), and sequencer_clipboard_paste_exec().
In cases where we don't know the sequence's listbase.
Definition at line 364 of file sequencer/intern/utils.cc.
References BLI_findindex(), SEQ_editing_get(), seq_sequence_lookup_meta_by_seq(), Editing::seqbase, and Sequence::seqbase.
Referenced by do_adjustment_impl(), do_multicam(), and SEQ_edit_move_strip_to_meta().
Definition at line 178 of file sequencer/intern/utils.cc.
References Editing::channels, Sequence::channels, Sequence::flag, Scene::r, Sequence::scene, SEQ_editing_get(), SEQ_SCENE_STRIPS, SEQ_time_start_frame_get(), SEQ_TYPE_META, SEQ_TYPE_SCENE, Editing::seqbase, Sequence::seqbase, RenderData::sfra, and Sequence::type.
Referenced by do_render_strip_seqbase(), and drawmeta_contents().
Definition at line 399 of file sequencer/intern/utils.cc.
References BLI_listbase_is_empty(), LISTBASE_FOREACH, SEQ_get_sequence_by_name(), and STREQ.
Referenced by animchan_sync_fcurve_scene(), SEQ_get_sequence_by_name(), and skip_fcurve_selected_data().
Definition at line 328 of file sequencer/intern/utils.cc.
References ELEM, LISTBASE_FOREACH, Sequence::machine, SEQ_channels_displayed_get(), SEQ_render_is_muted(), SEQ_time_strip_intersects_frame(), SEQ_TYPE_COLOR, SEQ_TYPE_IMAGE, SEQ_TYPE_META, SEQ_TYPE_MOVIE, SEQ_TYPE_SCENE, SEQ_TYPE_TEXT, and Editing::seqbasep.
Referenced by stampdata().
Definition at line 297 of file sequencer/intern/utils.cc.
References Sequence::anims, BLI_addtail(), BLI_path_abs(), BLI_path_join, Strip::dirpath, FILE_MAX, StripElem::filename, ListBase::first, Sequence::flag, ID_BLEND_PATH_FROM_GLOBAL, index_dir_set(), MEM_mallocN, open_anim_file_multiview(), open_anim_filepath(), R_MULTIVIEW, SEQ_relations_sequence_free_anim(), SEQ_USE_VIEWS, Sequence::strip, and Strip::stripdata.
Referenced by seq_proxy_fetch(), SEQ_proxy_rebuild_context(), seq_render_movie_strip(), and SEQ_time_sequence_get_fps().
Definition at line 76 of file sequencer/intern/utils.cc.
References SeqUniqueInfo::count, dot(), SeqUniqueInfo::match, Sequence::name, SeqUniqueInfo::name_dest, SeqUniqueInfo::name_src, SeqUniqueInfo::seq, SEQ_edit_sequence_name_set(), SEQ_for_each_callback(), seqbase_unique_name(), seqbase_unique_name_recursive_fn(), and STRNCPY.
Referenced by do_versions_seq_unique_name_all_strips(), seq_add_generic_update(), seq_dupli(), SEQ_ensure_unique_name(), and sequencer_meta_make_exec().
Only use as last resort when the StripElem is available but no the Sequence. (needed for RNA)
Definition at line 379 of file sequencer/intern/utils.cc.
References ARRAY_HAS_ITEM, ListBase::first, Sequence::len, Sequence::next, SEQ_sequence_from_strip_elem(), Sequence::seqbase, Sequence::strip, and Strip::stripdata.
Referenced by SEQ_sequence_from_strip_elem().
| const char * SEQ_sequence_give_name | ( | const Sequence * | seq | ) |
Definition at line 164 of file sequencer/intern/utils.cc.
References DATA_, Strip::dirpath, give_seqname_by_type(), SEQ_TYPE_EFFECT, Sequence::strip, and Sequence::type.
Referenced by draw_seq_text_get_name(), and seq_add_set_name().
| bool SEQ_sequence_has_valid_data | ( | const Sequence * | seq | ) |
Check if an input referenced by this strip is valid (e.g. scene for a scene strip). Note that this only checks data block references, for missing media referenced by paths use #media_presence_is_missing.
Definition at line 435 of file sequencer/intern/utils.cc.
References Sequence::clip, Sequence::mask, Sequence::scene, SEQ_TYPE_MASK, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, Sequence::sound, and Sequence::type.
Referenced by drawmeta_contents(), skip_modifier(), and strip_draw_context_get().
| void SEQ_set_scale_to_fit | ( | const Sequence * | seq, |
| const int | image_width, | ||
| const int | image_height, | ||
| const int | preview_width, | ||
| const int | preview_height, | ||
| const eSeqImageFitMethod | fit_method ) |
Definition at line 466 of file sequencer/intern/utils.cc.
References float, image_height, image_width, StripTransform::scale_x, SEQ_SCALE_TO_FILL, SEQ_SCALE_TO_FIT, SEQ_STRETCH_TO_FILL, SEQ_USE_ORIGINAL_SIZE, Sequence::strip, and Strip::transform.
Referenced by SEQ_add_image_strip(), SEQ_add_movie_strip(), and sequencer_strip_transform_fit_exec().
|
static |
Definition at line 56 of file sequencer/intern/utils.cc.
References SeqUniqueInfo::count, LISTBASE_FOREACH, SeqUniqueInfo::match, SeqUniqueInfo::name_dest, SeqUniqueInfo::name_src, SeqUniqueInfo::seq, SEQ_NAME_MAXSTR, SNPRINTF, and STREQ.
Referenced by SEQ_sequence_base_unique_name_recursive(), and seqbase_unique_name_recursive_fn().
|
static |
Definition at line 68 of file sequencer/intern/utils.cc.
References ListBase::first, Sequence::seqbase, and seqbase_unique_name().
Referenced by SEQ_sequence_base_unique_name_recursive().
| bool sequencer_seq_generates_image | ( | Sequence * | seq | ) |
Definition at line 451 of file sequencer/intern/utils.cc.
References SEQ_TYPE_COLOR, SEQ_TYPE_IMAGE, SEQ_TYPE_MASK, SEQ_TYPE_MOVIE, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, SEQ_TYPE_TEXT, and Sequence::type.
Referenced by SEQ_relations_check_scene_recursion().
Definition at line 224 of file sequencer/intern/utils.cc.
References Strip::proxy, Editing::proxy_storage, SEQ_EDIT_PROXY_DIR_STORAGE, SEQ_STORAGE_PROXY_CUSTOM_DIR, StripProxy::storage, and Sequence::strip.
Referenced by BKE_movieclip_filepath_for_frame(), index_dir_set(), movieclip_load_sequence_file(), prefetch_task_func(), and proxy_dir_get().