Skip to content

Commit

Permalink
When determining transition direction, ignore clips that end too clos…
Browse files Browse the repository at this point in the history
…e to the beginning of the transition. (#5102)
  • Loading branch information
jonoomph committed Jan 18, 2023
1 parent 7672250 commit 369b68d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/windows/views/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,19 @@ def update_transition_data(self, transition_json, only_basic_props=True,
diff_from_end = abs((intersecting_clip.data.get("position", 0.0) + \
(intersecting_clip.data.get("end", 0.0) - intersecting_clip.data.get("start", 0.0))) \
- position)
if diff_from_end <= 0.25:
# Ignore when a transition is less than 1/2 second from the right edge of a clip
continue
smallest_diff = min(diff_from_start, diff_from_end)
if smallest_diff < diff_from_edge:
diff_from_edge = smallest_diff
if diff_from_end < diff_from_start:
is_forward_direction = False
else:
is_forward_direction = True
log.debug(f'Intersecting Clip: pos:{intersecting_clip.data.get("position")}, '
f'from start: {diff_from_start}, from end: {diff_from_end}, '
f'is forward: {is_forward_direction}')
log.debug(f"Is transition moving in a forward direction? {is_forward_direction}")

# Determine existing brightness and contrast ranges (if any)
Expand Down

0 comments on commit 369b68d

Please sign in to comment.