Blender
V3.3
|
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BKE_context.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "UI_view2d.h"
#include "SEQ_channels.h"
#include "SEQ_effects.h"
#include "SEQ_iterator.h"
#include "SEQ_relations.h"
#include "SEQ_render.h"
#include "SEQ_sequencer.h"
#include "SEQ_time.h"
#include "transform.h"
#include "transform_convert.h"
#include "transform_snap.h"
Go to the source code of this file.
Classes | |
struct | TransSeqSnapData |
Typedefs | |
typedef struct TransSeqSnapData | TransSeqSnapData |
typedef struct TransSeqSnapData TransSeqSnapData |
Definition at line 58 of file transform_snap_sequencer.c.
References Freestyle::a, and usdtokens::b().
Referenced by seq_snap_source_points_build(), seq_snap_target_points_build(), and UI_but_func_identity_compare_set().
Definition at line 387 of file transform_snap_sequencer.c.
References C, drawSnapping(), MOD_SNAP, POINT_INIT, SPACE_SEQ, t, TARGET_INIT, and TFM_SEQ_SLIDE.
Referenced by draw_seq_in_view().
bool ED_transform_snap_sequencer_to_closest_strip_calc | ( | struct Scene * | scene, |
struct ARegion * | region, | ||
int | frame_1, | ||
int | frame_2, | ||
int * | r_snap_distance, | ||
float * | r_snap_frame | ||
) |
Iterates over all the strips and finds the closest snapping candidate of either frame_1 or frame_2. The closest snapping candidate will be the closest start or end frame of an existing strip.
Definition at line 368 of file transform_snap_sequencer.c.
References scene, SEQ_tool_settings_snap_mode_get(), t, TransConvertType_Sequencer, transform_snap_sequencer_to_closest_strip_ex(), and validSnap().
Referenced by update_overlay_strip_position_data().
|
static |
Definition at line 127 of file transform_snap_sequencer.c.
References channels(), LISTBASE_FOREACH, query_strip_effects_fn(), scene, SELECT, SEQ_active_seqbase_get(), SEQ_channels_displayed_get(), SEQ_collection_append_strip(), SEQ_collection_create(), SEQ_collection_duplicate(), SEQ_collection_exclude(), SEQ_collection_expand(), seq_collection_extract_effects(), SEQ_collection_free(), SEQ_editing_get(), SEQ_render_is_muted(), SEQ_SNAP_IGNORE_MUTED, SEQ_SNAP_IGNORE_SOUND, SEQ_tool_settings_snap_flag_get(), and SEQ_TYPE_SOUND_RAM.
Referenced by transform_snap_sequencer_data_alloc(), and transform_snap_sequencer_to_closest_strip_ex().
|
static |
Definition at line 98 of file transform_snap_sequencer.c.
References LISTBASE_FOREACH, scene, SEQ_collection_append_strip(), and SEQ_relation_is_effect_of_strip().
Referenced by query_snap_targets().
|
static |
Definition at line 115 of file transform_snap_sequencer.c.
References SEQ_collection_append_strip(), SEQ_collection_create(), SEQ_effect_get_num_inputs(), SEQ_ITERATOR_FOREACH, and Sequence::type.
Referenced by query_snap_targets().
|
static |
Definition at line 45 of file transform_snap_sequencer.c.
References SEQ_collection_len().
Referenced by seq_snap_source_points_alloc().
|
static |
Definition at line 160 of file transform_snap_sequencer.c.
References count, SEQ_collection_len(), SEQ_SNAP_TO_CURRENT_FRAME, and SEQ_SNAP_TO_STRIP_HOLD.
Referenced by seq_snap_target_points_alloc().
|
static |
Definition at line 50 of file transform_snap_sequencer.c.
References MEM_callocN, seq_get_snap_source_points_len(), TransSeqSnapData::source_snap_point_count, and TransSeqSnapData::source_snap_points.
Referenced by transform_snap_sequencer_data_alloc().
|
static |
Definition at line 63 of file transform_snap_sequencer.c.
References BLI_assert, cmp_fn(), Sequence::flag, left, right, scene, SEQ_ITERATOR_FOREACH, SEQ_LEFTSEL, SEQ_RIGHTSEL, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), TransSeqSnapData::source_snap_point_count, and TransSeqSnapData::source_snap_points.
Referenced by transform_snap_sequencer_data_alloc().
|
static |
Definition at line 177 of file transform_snap_sequencer.c.
References MEM_callocN, seq_get_snap_target_points_count(), TransSeqSnapData::target_snap_point_count, and TransSeqSnapData::target_snap_points.
Referenced by transform_snap_sequencer_data_alloc(), and transform_snap_sequencer_to_closest_strip_ex().
|
static |
Definition at line 187 of file transform_snap_sequencer.c.
References BLI_assert, RenderData::cfra, CLAMP, cmp_fn(), Sequence::len, max_ii(), min_ii(), Scene::r, scene, SEQ_ITERATOR_FOREACH, SEQ_SNAP_TO_CURRENT_FRAME, SEQ_SNAP_TO_STRIP_HOLD, SEQ_time_left_handle_frame_get(), SEQ_time_right_handle_frame_get(), SEQ_TYPE_EFFECT, Sequence::start, TransSeqSnapData::target_snap_point_count, TransSeqSnapData::target_snap_points, and Sequence::type.
Referenced by transform_snap_sequencer_data_alloc(), and transform_snap_sequencer_to_closest_strip_ex().
|
static |
Definition at line 236 of file transform_snap_sequencer.c.
References round_fl_to_int(), SEQ_tool_settings_snap_distance_get(), t, and UI_view2d_region_to_view_x().
Referenced by transform_snap_sequencer_calc().
Definition at line 325 of file transform_snap_sequencer.c.
References t.
Referenced by ApplySnapTranslation(), initSeqSlide(), and transform_snap_sequencer_to_closest_strip_ex().
Definition at line 286 of file transform_snap_sequencer.c.
References blender::math::abs(), CON_APPLY, CON_AXIS1, MAXFRAME, NULL, round_fl_to_int(), seq_snap_threshold_get_frame_distance(), TransSeqSnapData::source_snap_point_count, TransSeqSnapData::source_snap_points, t, TransSeqSnapData::target_snap_point_count, and TransSeqSnapData::target_snap_points.
Referenced by snap_calc_sequencer_fn(), and transform_snap_sequencer_to_closest_strip_ex().
TransSeqSnapData* transform_snap_sequencer_data_alloc | ( | const TransInfo * | t | ) |
Definition at line 246 of file transform_snap_sequencer.c.
References MEM_callocN, MEM_freeN, NULL, query_snap_targets(), scene, SEQ_active_seqbase_get(), SEQ_collection_free(), SEQ_collection_len(), SEQ_editing_get(), SEQ_query_selected_strips(), seq_snap_source_points_alloc(), seq_snap_source_points_build(), seq_snap_target_points_alloc(), seq_snap_target_points_build(), t, and TransConvertType_SequencerImage.
Referenced by initSnappingMode().
void transform_snap_sequencer_data_free | ( | TransSeqSnapData * | data | ) |
Definition at line 279 of file transform_snap_sequencer.c.
References data, and MEM_freeN.
Referenced by freeSnapping(), and transform_snap_sequencer_to_closest_strip_ex().
|
static |
Definition at line 330 of file transform_snap_sequencer.c.
References BLI_assert, MEM_callocN, NULL, POINT_INIT, query_snap_targets(), scene, SEQ_collection_create(), SEQ_collection_free(), seq_snap_target_points_alloc(), seq_snap_target_points_build(), TransSeqSnapData::source_snap_point_count, TransSeqSnapData::source_snap_points, t, TARGET_INIT, transform_snap_sequencer_apply_translate(), transform_snap_sequencer_calc(), and transform_snap_sequencer_data_free().
Referenced by ED_transform_snap_sequencer_to_closest_strip_calc().