From a6b91d9d3f48b16794fabf4250273943b883cf70 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Mon, 13 Apr 2026 23:55:06 +0200 Subject: [PATCH] fix: crop keyframes and position apply to random portrait/square exports Keyframes were skipped when ratio was None (random mode), and random crop was overwriting the resolved center with base_center. Now keyframes resolve the center for all jobs first, then random crop assigns the ratio while preserving the per-job center. Co-Authored-By: Claude Opus 4.6 --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index a17e969..a76a2c9 100755 --- a/main.py +++ b/main.py @@ -2741,8 +2741,6 @@ class MainWindow(QMainWindow): # at or before its start time (keyframes set in lock mode). if self._crop_keyframes: for i, (s, o, r, c) in enumerate(jobs): - if r is None: - continue # no crop → skip center = base_center for kt, kc in self._crop_keyframes: if kt <= s + 0.05: @@ -2766,8 +2764,8 @@ class MainWindow(QMainWindow): else: ratios = ["1:1"] for idx in indices: - s, o, _, _ = jobs[idx] - jobs[idx] = (s, o, random.choice(ratios), base_center) + s, o, _, c = jobs[idx] + jobs[idx] = (s, o, random.choice(ratios), c) # Subject tracking: re-detect crop center per sub-clip. if self._chk_track.isChecked() and any(j[2] for j in jobs):