Blender
V3.3
|
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BKE_main.h"
#include "BKE_scene.h"
#include "BKE_sound.h"
#include "SEQ_animation.h"
#include "SEQ_channels.h"
#include "SEQ_edit.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
#include "SEQ_sequencer.h"
#include "SEQ_time.h"
#include "SEQ_transform.h"
#include "sequencer.h"
#include "strip_time.h"
#include "CLG_log.h"
Go to the source code of this file.
Typedefs | |
typedef enum eOvelapDescrition | eOvelapDescrition |
Enumerations | |
enum | eOvelapDescrition { STRIP_OVERLAP_NONE , STRIP_OVERLAP_IS_FULL , STRIP_OVERLAP_IS_INSIDE , STRIP_OVERLAP_LEFT_SIDE , STRIP_OVERLAP_RIGHT_SIDE } |
Variables | |
static CLG_LogRef | LOG = {"seq.strip_transform"} |
typedef enum eOvelapDescrition eOvelapDescrition |
enum eOvelapDescrition |
Enumerator | |
---|---|
STRIP_OVERLAP_NONE | |
STRIP_OVERLAP_IS_FULL | |
STRIP_OVERLAP_IS_INSIDE | |
STRIP_OVERLAP_LEFT_SIDE | |
STRIP_OVERLAP_RIGHT_SIDE |
Definition at line 412 of file strip_transform.c.
|
static |
Definition at line 305 of file strip_transform.c.
References NULL, Sequence::seq1, SEQ_collection_append_strip(), SEQ_collection_create(), SEQ_ITERATOR_FOREACH, SEQ_TYPE_EFFECT, and Sequence::type.
Referenced by seq_transform_handle_expand_to_fit(), and seq_transform_handle_overlap_shuffle().
|
static |
Definition at line 424 of file strip_transform.c.
References scene, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), STRIP_OVERLAP_IS_FULL, STRIP_OVERLAP_IS_INSIDE, STRIP_OVERLAP_LEFT_SIDE, STRIP_OVERLAP_NONE, and STRIP_OVERLAP_RIGHT_SIDE.
Referenced by seq_transform_handle_overwrite().
|
static |
Definition at line 384 of file strip_transform.c.
References scene, SEQ_collection_remove_strip(), SEQ_ITERATOR_FOREACH, SEQ_query_unselected_strips(), and SEQ_transform_test_overlap_seq_seq().
Referenced by seq_transform_handle_overwrite().
|
static |
Definition at line 318 of file strip_transform.c.
References LISTBASE_FOREACH, MAXFRAME, min_ii(), scene, SELECT, SEQ_collection_append_strip(), SEQ_collection_create(), SEQ_collection_has_strip(), SEQ_ITERATOR_FOREACH, and SEQ_time_left_handle_frame_get().
Referenced by seq_transform_handle_expand_to_fit().
Definition at line 750 of file strip_transform.c.
References Scene::r, scene, RenderData::xsch, and RenderData::ysch.
Referenced by sequencer_set_2d_cursor_exec().
Definition at line 744 of file strip_transform.c.
References Scene::r, scene, RenderData::xsch, and RenderData::ysch.
Referenced by calculateCenterCursor2D(), gizmo2d_calc_bounds(), gizmo2d_calc_transform_pivot(), sequencer_preview_region_draw(), and setTransformViewAspect().
void SEQ_image_transform_bounding_box_from_collection | ( | struct Scene * | scene, |
struct SeqCollection * | strips, | ||
bool | apply_rotation, | ||
float | r_min[2], | ||
float | r_max[2] | ||
) |
Get viewport axis aligned bounding box from a collection of sequences. The collection must have one or more strips
scene | Scene in which strips are located |
strips | Collection of strips to get the bounding box from |
apply_rotation | Include sequence rotation transform in the bounding box calculation |
r_min | Minimum x and y values |
r_max | Maximum x and y values |
Definition at line 756 of file strip_transform.c.
References INIT_MINMAX2, minmax_v2v2_v2(), quad, scene, SEQ_image_transform_quad_get(), and SEQ_ITERATOR_FOREACH.
Referenced by gizmo2d_calc_bounds(), and seq_view_collection_rect_preview().
void SEQ_image_transform_final_quad_get | ( | const Scene * | scene, |
const Sequence * | seq, | ||
float | r_quad[4][2] | ||
) |
Definition at line 737 of file strip_transform.c.
References scene, and seq_image_transform_quad_get_ex().
Referenced by seq_box_select_rect_image_isect(), seq_draw_image_origin_and_outline(), seq_image_transform_transparency_gained(), and seq_point_image_isect().
Definition at line 637 of file strip_transform.c.
References Sequence::flag, SEQ_FLIPX, and SEQ_FLIPY.
Referenced by gizmo2d_calc_rotation(), recalcData_sequencer_image(), SEQ_image_transform_origin_offset_pixelspace_get(), and seq_image_transform_quad_get_ex().
void SEQ_image_transform_origin_offset_pixelspace_get | ( | const Scene * | scene, |
const Sequence * | seq, | ||
float | r_origin[2] | ||
) |
Definition at line 650 of file strip_transform.c.
References mul_v2_v2(), NULL, StripElem::orig_height, StripElem::orig_width, Scene::r, scene, SEQ_image_transform_mirror_factor_get(), Sequence::strip, Strip::stripdata, transform(), Strip::transform, RenderData::xasp, RenderData::xsch, RenderData::yasp, and RenderData::ysch.
Referenced by seq_draw_image_origin_and_outline(), seq_get_strip_pivot_median(), seq_select_seq_from_preview(), and SeqToTransData().
void SEQ_image_transform_quad_get | ( | const Scene * | scene, |
const Sequence * | seq, | ||
bool | apply_rotation, | ||
float | r_quad[4][2] | ||
) |
Definition at line 729 of file strip_transform.c.
References scene, and seq_image_transform_quad_get_ex().
Referenced by SEQ_image_transform_bounding_box_from_collection().
|
static |
Definition at line 676 of file strip_transform.c.
References axis_angle_to_mat3_single(), StripCrop::bottom, copy_v2_v2(), Strip::crop, ELEM, StripCrop::left, loc_rot_size_to_mat4(), mul_m4_v3(), mul_v2_v2(), StripElem::orig_height, StripElem::orig_width, Scene::r, StripCrop::right, scene, SEQ_image_transform_mirror_factor_get(), SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, Sequence::strip, Strip::stripdata, StripCrop::top, transform(), Strip::transform, transform_pivot_set_m4(), Sequence::type, RenderData::xasp, RenderData::xsch, RenderData::yasp, RenderData::ysch, and zero_v2().
Referenced by SEQ_image_transform_final_quad_get(), and SEQ_image_transform_quad_get().
Definition at line 85 of file strip_transform.c.
References left, offset, scene, 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_transform_single_image_check(), and Sequence::start.
Referenced by flushTransSeq(), SEQ_add_reload_new_file(), seq_update_meta_disp_range(), and sequencer_snap_exec().
|
static |
Definition at line 349 of file strip_transform.c.
References extract_standalone_strips(), Sequence::machine, markers, Scene::markers, MAXSEQ, NULL, query_right_side_strips(), scene, SEQ_collection_free(), SEQ_ITERATOR_FOREACH, and SEQ_transform_seqbase_shuffle_time().
Referenced by SEQ_transform_handle_overlap().
void SEQ_transform_handle_overlap | ( | Scene * | scene, |
ListBase * | seqbasep, | ||
SeqCollection * | transformed_strips, | ||
SeqCollection * | time_dependent_strips, | ||
bool | use_sync_markers | ||
) |
Definition at line 576 of file strip_transform.c.
References Sequence::flag, scene, SEQ_ITERATOR_FOREACH, SEQ_OVERLAP, SEQ_OVERLAP_EXPAND, SEQ_OVERLAP_OVERWRITE, SEQ_OVERLAP_SHUFFLE, SEQ_tool_settings_overlap_mode_get(), seq_transform_handle_expand_to_fit(), seq_transform_handle_overlap_shuffle(), seq_transform_handle_overwrite(), SEQ_transform_seqbase_shuffle(), and SEQ_transform_test_overlap().
Referenced by freeSeqData(), seq_load_apply_generic_options(), sequencer_add_movie_multiple_strips(), and sequencer_add_movie_single_strip().
|
static |
Definition at line 561 of file strip_transform.c.
References extract_standalone_strips(), markers, Scene::markers, scene, SEQ_collection_free(), and SEQ_transform_seqbase_shuffle_time().
Referenced by SEQ_transform_handle_overlap().
|
static |
Definition at line 518 of file strip_transform.c.
References ELEM, Sequence::machine, overlap_description_get(), query_overwrite_targets(), scene, SEQ_collection_append_strip(), SEQ_collection_create(), SEQ_collection_free(), SEQ_collection_len(), SEQ_edit_flag_for_removal(), SEQ_edit_remove_flagged_sequences(), SEQ_ITERATOR_FOREACH, seq_transform_handle_overwrite_split(), seq_transform_handle_overwrite_trim(), STRIP_OVERLAP_IS_FULL, STRIP_OVERLAP_IS_INSIDE, STRIP_OVERLAP_LEFT_SIDE, and STRIP_OVERLAP_RIGHT_SIDE.
Referenced by SEQ_transform_handle_overlap().
|
static |
Definition at line 456 of file strip_transform.c.
References NULL, scene, SEQ_edit_flag_for_removal(), SEQ_edit_remove_flagged_sequences(), SEQ_edit_strip_split(), SEQ_SPLIT_SOFT, SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by seq_transform_handle_overwrite().
|
static |
Definition at line 485 of file strip_transform.c.
References BLI_assert, scene, SEQ_collection_expand(), SEQ_collection_free(), SEQ_effect_get_num_inputs(), SEQ_ITERATOR_FOREACH, SEQ_query_by_reference(), SEQ_query_strip_effect_chain(), 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_EFFECT, STRIP_OVERLAP_LEFT_SIDE, STRIP_OVERLAP_RIGHT_SIDE, and Sequence::type.
Referenced by seq_transform_handle_overwrite().
Check if seq
can be moved. This function also checks SeqTimelineChannel
flag.
Definition at line 630 of file strip_transform.c.
References channels(), Sequence::flag, Sequence::machine, SEQ_channel_get_by_index(), SEQ_channel_is_locked(), SEQ_IGNORE_CHANNEL_LOCK, and SEQ_LOCK.
Referenced by draw_seq_strip(), screen_ctx_selected_editable_sequences(), SeqTransInfo(), sequencer_mute_exec(), sequencer_snap_exec(), and sequencer_unmute_exec().
void SEQ_transform_offset_after_frame | ( | struct Scene * | scene, |
struct ListBase * | seqbase, | ||
int | delta, | ||
int | timeline_frame | ||
) |
Move strips and markers (if not locked) that start after timeline_frame by delta frames
scene | Scene in which strips are located |
seqbase | ListBase in which strips are located |
delta | offset in frames to be applied |
timeline_frame | frame on timeline from where strips are moved |
Definition at line 609 of file strip_transform.c.
References LISTBASE_FOREACH, ToolSettings::lock_markers, Scene::markers, scene, SEQ_relations_invalidate_cache_preprocessed(), SEQ_time_left_handle_frame_get(), SEQ_transform_translate_sequence(), and Scene::toolsettings.
Referenced by SEQ_edit_remove_gaps(), and sequencer_gap_insert_exec().
Check if the selected seq's reference unselected seq's.
Definition at line 44 of file strip_transform.c.
References ListBase::first, Sequence::flag, Sequence::next, SELECT, Sequence::seq1, Sequence::seq2, Sequence::seq3, SEQ_TYPE_EFFECT, and Sequence::type.
Referenced by sequencer_copy_exec(), and sequencer_meta_make_exec().
Definition at line 205 of file strip_transform.c.
References SEQ_transform_seqbase_shuffle_ex().
Referenced by SEQ_edit_move_strip_to_seqbase(), seq_load_apply_generic_options(), seq_transform_cancel(), SEQ_transform_handle_overlap(), sequencer_meta_make_exec(), sequencer_meta_separate_exec(), sequencer_offset_clear_exec(), sequencer_paste_exec(), sequencer_reload_exec(), sequencer_separate_images_exec(), sequencer_snap_exec(), and sequencer_swap_exec().
bool SEQ_transform_seqbase_shuffle_ex | ( | struct ListBase * | seqbasep, |
struct Sequence * | test, | ||
struct Scene * | evil_scene, | ||
int | channel_delta | ||
) |
Definition at line 165 of file strip_transform.c.
References BLI_assert, ELEM, ListBase::first, Sequence::machine, max_ii(), MAXSEQ, Sequence::next, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_transform_test_overlap(), SEQ_transform_translate_sequence(), SEQ_valid_strip_channel(), and Sequence::start.
Referenced by SEQ_transform_seqbase_shuffle().
bool SEQ_transform_seqbase_shuffle_time | ( | SeqCollection * | strips_to_shuffle, |
SeqCollection * | time_dependent_strips, | ||
ListBase * | seqbasep, | ||
Scene * | evil_scene, | ||
ListBase * | markers, | ||
const bool | use_sync_markers | ||
) |
Definition at line 267 of file strip_transform.c.
References TimeMarker::flag, Sequence::flag, TimeMarker::frame, ToolSettings::lock_markers, markers, TimeMarker::next, NULL, offset, SELECT, SEQ_ITERATOR_FOREACH, SEQ_offset_animdata(), SEQ_OVERLAP, SEQ_transform_translate_sequence(), shuffle_seq_time_offset_get(), and Scene::toolsettings.
Referenced by seq_transform_handle_expand_to_fit(), and seq_transform_handle_overlap_shuffle().
Definition at line 106 of file strip_transform.c.
References SEQ_effect_get_num_inputs(), SEQ_TYPE_EFFECT, and Sequence::type.
Referenced by find_nearest_seq(), flushTransSeq(), query_time_dependent_strips_strips(), and sequencer_snap_exec().
Used so we can do a quick check for single image seq since they work a bit differently to normal image seq's (during transform).
Definition at line 37 of file strip_transform.c.
References Sequence::len, SEQ_effect_get_num_inputs(), SEQ_TYPE_EFFECT, SEQ_TYPE_IMAGE, and Sequence::type.
Referenced by draw_seq_strip(), and SEQ_transform_fix_single_image_seq_offsets().
Definition at line 120 of file strip_transform.c.
References ListBase::first, Sequence::next, scene, and SEQ_transform_test_overlap_seq_seq().
Referenced by flushTransSeq(), SEQ_edit_move_strip_to_seqbase(), seq_load_apply_generic_options(), seq_load_apply_generic_options_only_test_overlap(), seq_transform_cancel(), SEQ_transform_handle_overlap(), SEQ_transform_seqbase_shuffle_ex(), sequencer_meta_make_exec(), sequencer_meta_separate_exec(), sequencer_offset_clear_exec(), sequencer_paste_exec(), sequencer_reload_exec(), sequencer_separate_images_exec(), sequencer_snap_exec(), sequencer_swap_exec(), and update_overlay_strip_position_data().
Definition at line 111 of file strip_transform.c.
References Sequence::machine, scene, SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by query_overwrite_targets(), and SEQ_transform_test_overlap().
Definition at line 135 of file strip_transform.c.
References BLI_listbase_is_empty(), Sequence::enddisp, ListBase::first, Sequence::next, SEQ_offset_animdata(), seq_sequence_lookup_effects_by_seq(), seq_sequence_lookup_meta_by_seq(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), seq_time_translate_handles(), seq_time_update_effects_strip_range(), SEQ_time_update_meta_strip_range(), SEQ_TYPE_META, Sequence::seqbase, Sequence::start, Sequence::startdisp, and Sequence::type.
Referenced by flushTransSeq(), SEQ_transform_offset_after_frame(), SEQ_transform_seqbase_shuffle_ex(), SEQ_transform_seqbase_shuffle_time(), sequencer_paste_exec(), sequencer_snap_exec(), and swap_sequence().
|
static |
Definition at line 210 of file strip_transform.c.
References Sequence::machine, offset, scene, SEQ_time_left_handle_frame_get(), and SEQ_time_right_handle_frame_get().
Referenced by shuffle_seq_time_offset_get().
|
static |
Definition at line 222 of file strip_transform.c.
References CLOG_WARN, LISTBASE_FOREACH, LOG, max_ii(), min_ii(), offset, scene, SEQ_collection_has_strip(), SEQ_ITERATOR_FOREACH, SEQ_relation_is_effect_of_strip(), SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), shuffle_seq_test_overlap(), and UNLIKELY.
Referenced by SEQ_transform_seqbase_shuffle_time().
|
static |
Definition at line 35 of file strip_transform.c.
Referenced by shuffle_seq_time_offset_get().