Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition Direction: Ignore certain clips which don't affect transitions #5102

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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