36#define STRIP_EDGE_PAN_INSIDE_PAD 3.5
37#define STRIP_EDGE_PAN_OUTSIDE_PAD 0
38#define STRIP_EDGE_PAN_SPEED_RAMP 1
39#define STRIP_EDGE_PAN_MAX_SPEED 4
40#define STRIP_EDGE_PAN_DELAY 1.0f
41#define STRIP_EDGE_PAN_ZOOM_INFLUENCE 0.5f
62 int selection_channel_range_min;
63 int selection_channel_range_max;
94 int cfra = scene->
r.
cfra;
108 *r_count = *r_flag = 0;
110 else if (
left > cfra) {
118 *r_count = *r_flag = 0;
120 else if (right < cfra) {
143 *r_flag = strip->
flag;
147 *r_flag = strip->
flag;
182 td2d->
loc[0] = start_left;
183 tdsq->start_offset = start_left - strip->
start;
187 td2d->
loc[0] = start_left;
196 td2d->
loc2d =
nullptr;
203 tdsq->sel_flag = sel_flag;
205 td->
extra = (
void *)tdsq;
265 if ((custom_data->
data !=
nullptr) && custom_data->
use_free) {
266 TransSeq *ts =
static_cast<TransSeq *
>(custom_data->
data);
269 custom_data->
data =
nullptr;
278 for (
Strip *strip : transformed_strips) {
295 for (
Strip *strip : transformed_strips) {
307 for (
int a = 0; a < tc->
data_len; a++, td++) {
308 Strip *strip = ((TransDataSeq *)td->
extra)->strip;
326 for (
Strip *strip : transformed_strips) {
343 scene, seqbasep, transformed_strips, ts->time_dependent_strips, use_sync_markers);
382 while (strip_iter !=
nullptr) {
406 bool strip_added =
true;
408 while (strip_added) {
411 for (
Strip *strip : strips_no_handles) {
412 if (time_dependent_strips.
contains(strip)) {
417 if (strip->input1 && time_dependent_strips.
contains(strip->input1)) {
418 if (strip->input2 && !time_dependent_strips.
contains(strip->input2)) {
422 time_dependent_strips.
add(strip);
433 for (
Strip *strip : selected_strips) {
435 if (strip->input1 ==
nullptr || strip->input2 ==
nullptr) {
444 time_dependent_strips.
add(strip);
459 TransDataSeq *tdsq =
nullptr;
460 TransSeq *ts =
nullptr;
512 if ((strip->flag &
SELECT) != 0) {
513 ts->selection_channel_range_min =
min_ii(ts->selection_channel_range_min, strip->channel);
514 ts->selection_channel_range_max =
max_ii(ts->selection_channel_range_max, strip->channel);
561 int a, new_frame, offset;
565 TransDataSeq *tdsq =
nullptr;
581 float edge_pan_offset[2] = {0.0f, 0.0f};
585 for (a = 0, td = tc->
data, td2d = tc->
data_2d; a < tc->data_len; a++, td++, td2d++) {
586 tdsq = (TransDataSeq *)td->
extra;
591 switch (tdsq->sel_flag) {
594 offset = new_frame - tdsq->start_offset - strip->
start;
596 if (
abs(offset) >
abs(max_offset)) {
610 int new_right_frame =
round_fl_to_int(td->loc[0] + edge_pan_offset[0]);
636 for (
Strip *strip : ts->time_dependent_strips) {
646 for (
Strip *strip : transformed_strips) {
659 Strip *strip_prev =
nullptr;
663 for (a = 0, td = tc->
data; a < tc->data_len; a++, td++) {
664 TransDataSeq *tdsq = (TransDataSeq *)td->
extra;
665 Strip *strip = tdsq->strip;
667 if (strip != strip_prev) {
693 for (
Strip *strip : strips) {
729 const int min_channel_after_transform = ts->selection_channel_range_min + channel_offset;
730 const int max_channel_after_transform = ts->selection_channel_range_max + channel_offset;
735 if (min_channel_after_transform < 1) {
736 r_val[1] -= min_channel_after_transform - 1;
#define LISTBASE_FOREACH(type, var, list)
MINLINE int round_fl_to_int(float a)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
void unit_m3(float m[3][3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BLI_rctf_transform_pt_v(const rctf *dst, const rctf *src, float xy_dst[2], const float xy_src[2])
bool BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, float limit)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ ID_RECALC_SEQUENCER_STRIPS
@ SEQ_IGNORE_CHANNEL_LOCK
@ SPACE_SEQ_DESELECT_STRIP_HANDLE
Read Guarded memory(de)allocation.
void UI_view2d_edge_pan_set_limits(View2DEdgePanData *vpd, float xmin, float xmax, float ymin, float ymax)
void UI_view2d_edge_pan_cancel(bContext *C, View2DEdgePanData *vpd)
void UI_view2d_edge_pan_init(bContext *C, View2DEdgePanData *vpd, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
void UI_view2d_edge_pan_apply(bContext *C, View2DEdgePanData *vpd, const int xy[2]) ATTR_NONNULL(1
int ED_markers_post_apply_transform(ListBase *markers, Scene *scene, int mode, float value, char side)
void add_multiple(Span< Key > keys)
bool contains(const Key &key) const
int64_t remove_if(Predicate &&predicate)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
void relations_invalidate_cache(Scene *scene, Strip *strip)
ListBase * channels_displayed_get(const Editing *ed)
VectorSet< Strip * > query_selected_strips(ListBase *seqbase)
void transform_translate_strip(Scene *evil_scene, Strip *strip, int delta)
void strip_channel_set(Strip *strip, int channel)
bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
Editing * editing_get(const Scene *scene)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void offset_animdata(const Scene *scene, Strip *strip, float ofs)
void query_strip_effect_chain(const Scene *scene, Strip *reference_strip, ListBase *seqbase, VectorSet< Strip * > &r_strips)
constexpr int MAX_CHANNELS
void iterator_set_expand(const Scene *scene, ListBase *seqbase, VectorSet< Strip * > &strips, void strip_query_func(const Scene *scene, Strip *strip_reference, ListBase *seqbase, VectorSet< Strip * > &strips))
bool transform_is_locked(ListBase *channels, const Strip *strip)
void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
void transform_handle_overlap(Scene *scene, ListBase *seqbasep, blender::Span< Strip * > transformed_strips, bool use_sync_markers)
ListBase * active_seqbase_get(const Editing *ed)
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
bool transform_strip_can_be_translated(const Strip *strip)
bool transform_seqbase_shuffle(ListBase *seqbasep, Strip *test, Scene *evil_scene)