Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_mask_types.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "BLI_blenlib.h"
#include "BKE_animsys.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "SEQ_animation.h"
#include "SEQ_channels.h"
#include "SEQ_edit.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
#include "SEQ_render.h"
#include "SEQ_select.h"
#include "SEQ_sequencer.h"
#include "SEQ_time.h"
#include "SEQ_utils.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "multiview.h"
#include "proxy.h"
#include "sequencer.h"
#include "utils.h"
Go to the source code of this file.
Classes | |
struct | SeqUniqueInfo |
Typedefs | |
typedef struct SeqUniqueInfo | SeqUniqueInfo |
typedef struct SeqUniqueInfo SeqUniqueInfo |
|
static |
Definition at line 110 of file utils.c.
References NULL, 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, SEQ_TYPE_WIPE, and type.
Referenced by SEQ_sequence_give_name().
Definition at line 440 of file utils.c.
References Sequence::mask, NULL, scene, SEQ_select_active_get(), SEQ_TYPE_MASK, and Sequence::type.
Referenced by ED_space_sequencer_check_show_maskedit(), and sequencer_context().
Definition at line 451 of file utils.c.
References Sequence::alpha_mode, BKE_image_alpha_mode_from_extension_ex(), StripElem::name, 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 523 of file utils.c.
References Scene::adt, BKE_animdata_fix_paths_rename(), BLI_strncpy_utf8(), Scene::ed, Scene::id, LISTBASE_FOREACH, Sequence::name, NULL, scene, SEQ_NAME_MAXSTR, SEQ_sequence_base_unique_name_recursive(), SEQ_TYPE_META, Sequence::seqbase, Editing::seqbase, and Sequence::type.
Referenced by SEQ_edit_strip_split(), sequencer_add_duplicate_exec(), and sequencer_paste_exec().
Definition at line 388 of file utils.c.
References NULL, SEQ_collection_free(), SEQ_ITERATOR_FOREACH, SEQ_query_all_strips_recursive(), SEQ_TYPE_META, Sequence::seqbase, and Sequence::type.
Definition at line 373 of file utils.c.
References BLI_findindex(), NULL, scene, SEQ_editing_get(), seq_sequence_lookup_meta_by_seq(), Sequence::seqbase, and Editing::seqbase.
Referenced by do_adjustment_impl(), do_multicam(), and SEQ_edit_move_strip_to_meta().
Definition at line 182 of file utils.c.
References Sequence::channels, Editing::channels, Sequence::flag, NULL, Scene::r, Sequence::scene, SEQ_editing_get(), SEQ_SCENE_STRIPS, SEQ_time_start_frame_get(), SEQ_TYPE_META, SEQ_TYPE_SCENE, Sequence::seqbase, Editing::seqbase, RenderData::sfra, and Sequence::type.
Referenced by do_render_strip_seqbase(), and drawmeta_contents().
Definition at line 422 of file utils.c.
References ListBase::first, Sequence::name, Sequence::next, NULL, Sequence::seqbase, and STREQ.
Referenced by animchan_sync_fcurve_scene(), and skip_fcurve_selected_data().
Definition at line 338 of file utils.c.
References channels(), Scene::ed, ELEM, ListBase::first, Sequence::machine, Sequence::next, NULL, scene, 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, Editing::seqbasep, and Sequence::type.
Referenced by stampdata().
Definition at line 209 of file utils.c.
References StripAnim::anim, Sequence::anims, BKE_main_blendfile_path_from_global(), BKE_scene_multiview_view_id_suffix_get(), BKE_scene_multiview_view_prefix_get(), BLI_addtail(), BLI_join_dirfile(), BLI_path_abs(), BLI_snprintf(), BLI_strncpy(), Strip::colorspace_settings, StripProxy::dir, Strip::dir, Scene::ed, FILE_MAX, ListBase::first, Sequence::flag, IB_animdeinterlace, IB_rect, IMB_suffix_anim(), MEM_mallocN, StripElem::name, ColorManagedColorspaceSettings::name, NULL, openanim(), openanim_noload(), Strip::proxy, Editing::proxy_dir, Editing::proxy_storage, Scene::r, R_IMF_VIEWS_INDIVIDUAL, R_MULTIVIEW, RenderData::scemode, scene, SEQ_EDIT_PROXY_DIR_STORAGE, SEQ_FILTERY, seq_num_files(), seq_proxy_index_dir_set(), SEQ_relations_sequence_free_anim(), SEQ_STORAGE_PROXY_CUSTOM_DIR, SEQ_USE_VIEWS, StripProxy::storage, str, Sequence::streamindex, Sequence::strip, Strip::stripdata, and Sequence::views_format.
Referenced by seq_proxy_fetch(), SEQ_proxy_rebuild_context(), seq_render_movie_strip(), and SEQ_time_sequence_get_fps().
void SEQ_sequence_base_unique_name_recursive | ( | struct Scene * | scene, |
ListBase * | seqbasep, | ||
Sequence * | seq | ||
) |
Definition at line 78 of file utils.c.
References BLI_strncpy(), SeqUniqueInfo::count, blender::math::dot(), SeqUniqueInfo::match, Sequence::name, SeqUniqueInfo::name_dest, SeqUniqueInfo::name_src, scene, SeqUniqueInfo::seq, SEQ_edit_sequence_name_set(), SEQ_for_each_callback(), seqbase_unique_name(), and seqbase_unique_name_recursive_fn().
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 403 of file utils.c.
References ARRAY_HAS_ITEM, ListBase::first, Sequence::len, Sequence::next, Sequence::seqbase, Sequence::strip, and Strip::stripdata.
const char* SEQ_sequence_give_name | ( | Sequence * | seq | ) |
Definition at line 168 of file utils.c.
References Strip::dir, give_seqname_by_type(), SEQ_TYPE_EFFECT, Sequence::strip, and Sequence::type.
Referenced by draw_seq_text_get_name(), and seq_add_set_name().
Definition at line 459 of file utils.c.
References Sequence::clip, Sequence::mask, NULL, Sequence::scene, SEQ_TYPE_MASK, SEQ_TYPE_MOVIECLIP, SEQ_TYPE_SCENE, SEQ_TYPE_SOUND_RAM, Sequence::sound, and Sequence::type.
Referenced by draw_seq_strip().
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 492 of file utils.c.
References float(), MAX2, MIN2, SEQ_SCALE_TO_FILL, SEQ_SCALE_TO_FIT, SEQ_STRETCH_TO_FILL, SEQ_USE_ORIGINAL_SIZE, Sequence::strip, transform(), and Strip::transform.
Referenced by SEQ_add_image_strip(), SEQ_add_movie_strip(), and sequencer_strip_transform_fit_exec().
|
static |
Definition at line 53 of file utils.c.
References BLI_snprintf(), SeqUniqueInfo::count, ListBase::first, SeqUniqueInfo::match, Sequence::name, SeqUniqueInfo::name_dest, SeqUniqueInfo::name_src, Sequence::next, SeqUniqueInfo::seq, SEQ_NAME_MAXSTR, and STREQ.
Referenced by SEQ_sequence_base_unique_name_recursive(), and seqbase_unique_name_recursive_fn().
Definition at line 70 of file utils.c.
References ListBase::first, Sequence::seqbase, and seqbase_unique_name().
Referenced by SEQ_sequence_base_unique_name_recursive().
Definition at line 477 of file utils.c.
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().