Fix #115981: Edge panning causes strips to overlap
Caused by floating point error in `BLI_rctf_transform_pt_v()`
The error is not fixed, but intead of recalculating each strip offset
with this function, only offset for {0, 0} is calculated and added to
easch strip.
Pull Request: https://projects.blender.org/blender/blender/pulls/123825
This commit is contained in:
committed by
Richard Antalik
parent
c309479912
commit
c7e75090bd
@@ -576,13 +576,15 @@ static void flushTransSeq(TransInfo *t)
|
||||
* recalculation, hierarchy is not taken into account. */
|
||||
int max_offset = 0;
|
||||
|
||||
float edge_pan_offset[2] = {0.0f, 0.0f};
|
||||
view2d_edge_pan_loc_compensate(t, edge_pan_offset, edge_pan_offset);
|
||||
|
||||
/* Flush to 2D vector from internally used 3D vector. */
|
||||
for (a = 0, td = tc->data, td2d = tc->data_2d; a < tc->data_len; a++, td++, td2d++) {
|
||||
tdsq = (TransDataSeq *)td->extra;
|
||||
seq = tdsq->seq;
|
||||
float loc[2];
|
||||
view2d_edge_pan_loc_compensate(t, td->loc, loc);
|
||||
new_frame = round_fl_to_int(loc[0]);
|
||||
|
||||
new_frame = round_fl_to_int(td->loc[0] + edge_pan_offset[0]);
|
||||
|
||||
switch (tdsq->sel_flag) {
|
||||
case SELECT: {
|
||||
@@ -593,7 +595,7 @@ static void flushTransSeq(TransInfo *t)
|
||||
max_offset = offset;
|
||||
}
|
||||
}
|
||||
seq->machine = round_fl_to_int(loc[1]);
|
||||
seq->machine = round_fl_to_int(td->loc[1] + edge_pan_offset[1]);
|
||||
CLAMP(seq->machine, 1, MAXSEQ);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user