Convert Expression to Keyframes: cap at 2^20 frames (a 3-hour 60 fps comp is 648,000)

This commit is contained in:
Dylan M. Taylor
2026-11-11 20:39:02 +00:00
parent b6b6c80439
commit 2c5d734950
+4 -2
View File
@@ -1387,8 +1387,10 @@ fn convert_expr_to_keys(s: &mut Session, p: &Value) -> Result<Value> {
convert_one_expr(s, cid, lid, uid)
}
/// Most keyframes Convert Expression to Keyframes makes (2.4 hours at 30 fps).
const MAX_CONVERTED_KEYS: u64 = 1 << 18;
/// Most keyframes Convert Expression to Keyframes makes: 2^20, 4.8 hours at 60 fps (After Effects
/// compositions run to 3 hours, 648,000 frames at 60 fps).
const MAX_CONVERTED_KEYS: u64 = 1 << 20;
const _: () = assert!(MAX_CONVERTED_KEYS >= 3 * 3600 * 60);
/// One evaluation and one key per frame of the layer: its In and Out points and the composition's
/// frame duration are saved data, so the step must advance and the count (a partial last frame