Skip to content

Commit 369b68d

Browse files
authored
When determining transition direction, ignore clips that end too close to the beginning of the transition. (#5102)
1 parent 7672250 commit 369b68d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/windows/views/webview.py

+6
Original file line numberDiff line numberDiff line change
@@ -394,13 +394,19 @@ def update_transition_data(self, transition_json, only_basic_props=True,
394394
diff_from_end = abs((intersecting_clip.data.get("position", 0.0) + \
395395
(intersecting_clip.data.get("end", 0.0) - intersecting_clip.data.get("start", 0.0))) \
396396
- position)
397+
if diff_from_end <= 0.25:
398+
# Ignore when a transition is less than 1/2 second from the right edge of a clip
399+
continue
397400
smallest_diff = min(diff_from_start, diff_from_end)
398401
if smallest_diff < diff_from_edge:
399402
diff_from_edge = smallest_diff
400403
if diff_from_end < diff_from_start:
401404
is_forward_direction = False
402405
else:
403406
is_forward_direction = True
407+
log.debug(f'Intersecting Clip: pos:{intersecting_clip.data.get("position")}, '
408+
f'from start: {diff_from_start}, from end: {diff_from_end}, '
409+
f'is forward: {is_forward_direction}')
404410
log.debug(f"Is transition moving in a forward direction? {is_forward_direction}")
405411

406412
# Determine existing brightness and contrast ranges (if any)

0 commit comments

Comments
 (0)