Blender
V3.3
|
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BKE_scene.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
#include "SEQ_render.h"
#include "SEQ_time.h"
#include "render.h"
Go to the source code of this file.
|
static |
Definition at line 241 of file iterator.c.
References Sequence::machine, SEQ_collection_remove_strip(), and SEQ_ITERATOR_FOREACH.
Referenced by SEQ_query_rendered_strips().
|
static |
Definition at line 289 of file iterator.c.
References channels(), must_render_strip(), SEQ_collection_remove_strip(), SEQ_ITERATOR_FOREACH, SEQ_render_is_muted(), SEQ_TYPE_SOUND_RAM, and Sequence::type.
Referenced by SEQ_query_rendered_strips().
|
static |
Definition at line 254 of file iterator.c.
References Sequence::blend_mode, Sequence::machine, SEQ_BLEND_REPLACE, SEQ_ITERATOR_FOREACH, SEQ_relation_is_effect_of_strip(), SEQ_TYPE_EFFECT, and Sequence::type.
Referenced by collection_filter_rendered_strips().
|
static |
Definition at line 184 of file iterator.c.
References LISTBASE_FOREACH, SEQ_collection_append_strip(), and SEQ_TYPE_META.
Referenced by SEQ_query_all_strips_recursive().
|
static |
Definition at line 227 of file iterator.c.
References LISTBASE_FOREACH, scene, SEQ_collection_append_strip(), SEQ_collection_create(), and SEQ_time_strip_intersects_frame().
Referenced by SEQ_query_rendered_strips().
bool SEQ_collection_append_strip | ( | struct Sequence * | seq, |
SeqCollection * | collection | ||
) |
Add strip to collection.
seq | strip to be added |
collection | collection to which strip will be added |
Definition at line 117 of file iterator.c.
References BLI_gset_ensure_p_ex(), and SeqCollection::set.
Referenced by extract_standalone_strips(), query_all_strips_recursive(), query_lower_channel_strips(), query_right_side_strips(), query_selected_strips_no_handles(), query_snap_targets(), query_strip_effects_fn(), query_strips_at_frame(), query_time_dependent_strips_strips(), SEQ_collection_duplicate(), seq_collection_extract_effects(), SEQ_collection_merge(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), seq_load_apply_generic_options(), seq_load_apply_generic_options_only_test_overlap(), SEQ_query_all_strips(), SEQ_query_all_strips_recursive(), SEQ_query_selected_strips(), SEQ_query_strip_effect_chain(), SEQ_query_unselected_strips(), seq_sequence_lookup_append_effect(), seq_transform_collection_from_transdata(), seq_transform_handle_overwrite(), sequencer_add_movie_multiple_strips(), and sequencer_add_movie_single_strip().
SeqCollection* SEQ_collection_create | ( | const char * | name | ) |
Create new empty strip collection.
Definition at line 87 of file iterator.c.
References BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_gset_new(), MEM_callocN, and SeqCollection::set.
Referenced by extract_standalone_strips(), query_right_side_strips(), query_selected_strips_no_handles(), query_snap_targets(), query_strips_at_frame(), SEQ_collection_duplicate(), SEQ_collection_expand(), seq_collection_extract_effects(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), seq_load_apply_generic_options(), SEQ_query_all_strips(), SEQ_query_all_strips_recursive(), SEQ_query_by_reference(), SEQ_query_selected_strips(), SEQ_query_unselected_strips(), seq_sequence_lookup_append_effect(), seq_transform_collection_from_transdata(), seq_transform_handle_overwrite(), sequencer_add_movie_multiple_strips(), sequencer_add_movie_single_strip(), sequencer_add_movie_strip_exec(), and transform_snap_sequencer_to_closest_strip_ex().
SeqCollection* SEQ_collection_duplicate | ( | SeqCollection * | collection | ) |
Duplicate collection
collection | collection to be duplicated |
Definition at line 172 of file iterator.c.
References SEQ_collection_append_strip(), SEQ_collection_create(), and SEQ_ITERATOR_FOREACH.
Referenced by query_snap_targets(), and query_time_dependent_strips_strips().
void SEQ_collection_exclude | ( | SeqCollection * | collection, |
SeqCollection * | exclude_elements | ||
) |
Remove strips from collection that are also in exclude_elements
. Source collection will be freed.
collection | collection from which strips are removed |
exclude_elements | collection of strips to be removed |
Definition at line 142 of file iterator.c.
References SEQ_collection_free(), SEQ_collection_remove_strip(), and SEQ_ITERATOR_FOREACH.
Referenced by query_snap_targets().
void SEQ_collection_expand | ( | const Scene * | scene, |
ListBase * | seqbase, | ||
SeqCollection * | collection, | ||
void | seq_query_funcconst Scene *scene, Sequence *seq_reference, ListBase *seqbase, SeqCollection *collection | ||
) |
Definition at line 151 of file iterator.c.
References scene, SEQ_collection_create(), SEQ_collection_merge(), SEQ_ITERATOR_FOREACH, and SEQ_query_by_reference().
Referenced by flushTransSeq(), freeSeqData(), query_snap_targets(), query_time_dependent_strips_strips(), select_grouped_effect_link(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), and seq_transform_handle_overwrite_trim().
void SEQ_collection_free | ( | SeqCollection * | collection | ) |
Free strip collection.
collection | collection to be freed |
Definition at line 81 of file iterator.c.
References BLI_gset_free(), MEM_freeN, NULL, and SeqCollection::set.
Referenced by createTransSeqImageData(), flushTransSeq(), free_transform_custom_data(), freeSeqData(), gizmo2d_calc_bounds(), gizmo2d_calc_rotation(), gizmo2d_calc_transform_orientation(), gizmo2d_calc_transform_pivot(), query_snap_targets(), query_time_dependent_strips_strips(), seq_box_select_seq_from_preview(), SEQ_collection_exclude(), SEQ_collection_merge(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), seq_frame_apply_snap(), SEQ_get_meta_by_seqbase(), seq_get_shown_sequences(), seq_get_strip_pivot_median(), seq_load_apply_generic_options(), seq_prefetch_must_skip_frame(), seq_select_seq_from_preview(), seq_transform_handle_expand_to_fit(), seq_transform_handle_overlap_shuffle(), seq_transform_handle_overwrite(), seq_transform_handle_overwrite_trim(), sequencer_add_movie_multiple_strips(), sequencer_add_movie_single_strip(), sequencer_add_movie_strip_exec(), sequencer_de_select_all_exec(), sequencer_delete_exec(), sequencer_draw_preview(), sequencer_drop_copy(), sequencer_select_grouped_exec(), sequencer_select_inverse_exec(), transform_snap_sequencer_data_alloc(), and transform_snap_sequencer_to_closest_strip_ex().
bool SEQ_collection_has_strip | ( | const Sequence * | seq, |
const SeqCollection * | collection | ||
) |
Definition at line 100 of file iterator.c.
References BLI_gset_haskey(), and SeqCollection::set.
Referenced by query_right_side_strips(), query_time_dependent_strips_strips(), sequencer_select_grouped_exec(), and shuffle_seq_time_offset_get().
uint SEQ_collection_len | ( | const SeqCollection * | collection | ) |
Return number of items in collection.
Definition at line 95 of file iterator.c.
References BLI_gset_len(), and SeqCollection::set.
Referenced by createTransSeqImageData(), gizmo2d_calc_bounds(), gizmo2d_calc_rotation(), gizmo2d_calc_transform_orientation(), gizmo2d_calc_transform_pivot(), select_grouped_effect_link(), seq_get_snap_source_points_len(), seq_get_snap_target_points_count(), seq_get_strip_pivot_median(), seq_transform_handle_overwrite(), sequencer_add_movie_strip_exec(), sequencer_view_selected_exec(), and transform_snap_sequencer_data_alloc().
void SEQ_collection_merge | ( | SeqCollection * | collection_dst, |
SeqCollection * | collection_src | ||
) |
Move strips from collection_src to collection_dst. Source collection will be freed.
collection_dst | destination collection |
collection_src | source collection |
Definition at line 133 of file iterator.c.
References SEQ_collection_append_strip(), SEQ_collection_free(), and SEQ_ITERATOR_FOREACH.
Referenced by SEQ_collection_expand().
bool SEQ_collection_remove_strip | ( | struct Sequence * | seq, |
SeqCollection * | collection | ||
) |
Remove strip from collection.
seq | strip to be removed |
collection | collection from which strip will be removed |
Definition at line 128 of file iterator.c.
References BLI_gset_remove(), NULL, and SeqCollection::set.
Referenced by collection_filter_channel_up_to_incl(), collection_filter_rendered_strips(), query_overwrite_targets(), query_scene_strips(), query_time_dependent_strips_strips(), SEQ_collection_exclude(), and SEQ_filter_selected_strips().
void SEQ_filter_selected_strips | ( | SeqCollection * | collection | ) |
Definition at line 366 of file iterator.c.
References Sequence::flag, SELECT, SEQ_collection_remove_strip(), and SEQ_ITERATOR_FOREACH.
Referenced by createTransSeqImageData(), gizmo2d_calc_bounds(), gizmo2d_calc_rotation(), gizmo2d_calc_transform_orientation(), gizmo2d_calc_transform_pivot(), select_grouped_effect_link(), selected_strips_from_context(), and seq_get_strip_pivot_median().
void SEQ_for_each_callback | ( | struct ListBase * | seqbase, |
SeqForEachFunc | callback, | ||
void * | user_data | ||
) |
Utility function to recursively iterate through all sequence strips in a seqbase
list. Uses callback to do operations on each sequence element. The callback can stop the iteration if needed.
seqbase | ListBase of sequences to be iterated over. |
callback | query function callback, returns false if iteration should stop. |
user_data | pointer to user data that can be used in the callback function. |
Definition at line 76 of file iterator.c.
References callback, seq_for_each_recursive(), and user_data.
Referenced by blo_do_versions_250(), blo_do_versions_260(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_300(), blo_do_versions_pre250(), blender::deg::DepsgraphNodeBuilder::build_scene_sequencer(), blender::deg::DepsgraphRelationBuilder::build_scene_sequencer(), do_versions_after_linking_300(), do_versions_ipos_to_animato(), IMB_colormanagement_check_file_config(), blender::deg::SequencerBackup::init_from_scene(), lib_link_clipboard_restore(), blender::deg::SequencerBackup::restore_to_scene(), scene_foreach_id(), scene_foreach_path(), SEQ_blend_read(), SEQ_blend_read_expand(), SEQ_blend_read_lib(), SEQ_blend_write(), SEQ_eval_sequences(), SEQ_relations_check_uuids_unique_and_report(), SEQ_sequence_base_unique_name_recursive(), seq_update_seq_cb(), sequencer_export_subtitles_exec(), and sound_update_animation_flags().
|
static |
Definition at line 60 of file iterator.c.
References callback, LISTBASE_FOREACH, SEQ_TYPE_META, and user_data.
Referenced by SEQ_for_each_callback().
bool SEQ_iterator_ensure | ( | SeqCollection * | collection, |
SeqIterator * | iterator, | ||
Sequence ** | r_seq | ||
) |
\Iterator API
Definition at line 32 of file iterator.c.
References BLI_gset_len(), BLI_gsetIterator_getKey(), BLI_gsetIterator_init(), BLI_gsetIterator_step(), SeqIterator::collection, SeqIterator::gsi, SeqIterator::iterator_initialized, and SeqCollection::set.
Sequence* SEQ_iterator_yield | ( | SeqIterator * | iterator | ) |
Utility function for SEQ_ITERATOR_FOREACH macro. Yield collection element
iterator | iterator to be initialized |
Definition at line 52 of file iterator.c.
References BLI_gsetIterator_done(), BLI_gsetIterator_getKey(), BLI_gsetIterator_step(), SeqIterator::gsi, and NULL.
SeqCollection* SEQ_query_all_strips | ( | ListBase * | seqbase | ) |
Query all strips in seqbase. This does not include strips nested in meta strips.
seqbase | ListBase in which strips are queried |
Definition at line 206 of file iterator.c.
References LISTBASE_FOREACH, SEQ_collection_append_strip(), and SEQ_collection_create().
Referenced by all_strips_from_context(), seq_frame_apply_snap(), and seq_time_gap_info_get().
SeqCollection* SEQ_query_all_strips_recursive | ( | ListBase * | seqbase | ) |
Query all strips in seqbase and nested meta strips.
seqbase | ListBase in which strips are queried |
Definition at line 194 of file iterator.c.
References LISTBASE_FOREACH, query_all_strips_recursive(), SEQ_collection_append_strip(), SEQ_collection_create(), and SEQ_TYPE_META.
Referenced by query_scene_strips(), and SEQ_get_meta_by_seqbase().
SeqCollection* SEQ_query_by_reference | ( | Sequence * | seq_reference, |
const Scene * | scene, | ||
ListBase * | seqbase, | ||
void | seq_query_funcconst Scene *scene, Sequence *seq_reference, ListBase *seqbase, SeqCollection *collection | ||
) |
Definition at line 105 of file iterator.c.
References scene, and SEQ_collection_create().
Referenced by SEQ_collection_expand(), and seq_transform_handle_overwrite_trim().
SeqCollection* SEQ_query_rendered_strips | ( | const Scene * | scene, |
ListBase * | channels, | ||
ListBase * | seqbase, | ||
const int | timeline_frame, | ||
const int | displayed_channel | ||
) |
Definition at line 309 of file iterator.c.
References channels(), collection_filter_channel_up_to_incl(), collection_filter_rendered_strips(), query_strips_at_frame(), and scene.
Referenced by all_strips_from_context(), createTransSeqImageData(), gizmo2d_calc_bounds(), gizmo2d_calc_rotation(), gizmo2d_calc_transform_orientation(), gizmo2d_calc_transform_pivot(), selected_strips_from_context(), seq_box_select_seq_from_preview(), seq_get_shown_sequences(), seq_get_strip_pivot_median(), seq_select_seq_from_preview(), sequencer_draw_preview(), and sequencer_drop_copy().
SeqCollection* SEQ_query_selected_strips | ( | struct ListBase * | seqbase | ) |
Query all selected strips in seqbase.
seqbase | ListBase in which strips are queried |
Definition at line 215 of file iterator.c.
References LISTBASE_FOREACH, SELECT, SEQ_collection_append_strip(), and SEQ_collection_create().
Referenced by query_time_dependent_strips_strips(), selected_strips_from_context(), and transform_snap_sequencer_data_alloc().
void SEQ_query_strip_effect_chain | ( | const Scene * | scene, |
Sequence * | seq_reference, | ||
ListBase * | seqbase, | ||
SeqCollection * | collection | ||
) |
Definition at line 335 of file iterator.c.
References LISTBASE_FOREACH, scene, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_collection_append_strip(), SEQ_TYPE_EFFECT, and Sequence::type.
Referenced by flushTransSeq(), freeSeqData(), query_time_dependent_strips_strips(), select_grouped_effect_link(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), and seq_transform_handle_overwrite_trim().
SeqCollection* SEQ_query_unselected_strips | ( | struct ListBase * | seqbase | ) |
Query all unselected strips in seqbase.
seqbase | ListBase in which strips are queried |
Definition at line 323 of file iterator.c.
References LISTBASE_FOREACH, SELECT, SEQ_collection_append_strip(), and SEQ_collection_create().
Referenced by query_overwrite_targets().