mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 13:08:07 -06:00
project: output_size clamps the scale, not the sides, and every renderer uses it
Clamping each side on its own broke the aspect ratio (a 30000x15000 comp at 4x came out 30000x30000). The effective scale min(s, MAX_SIZE/w, MAX_SIZE/h) keeps both sides within the comp limit, and the export pipeline and the locked-aspect width derivation render at that same scale, so nothing requests a frame larger than output_size reports.
This commit is contained in:
@@ -601,7 +601,7 @@ fn set_output_module(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let (w, h) = item.settings.output_size(comp);
|
||||
let mut crop_only = om.clone();
|
||||
crop_only.resize.enabled = false;
|
||||
let (cw, ch) = crop_only.frame_size(w, h, item.settings.resolution.clamp(0.01, 4.0));
|
||||
let (cw, ch) = crop_only.frame_size(w, h, item.settings.effective_scale(comp));
|
||||
om.resize.width = ((om.resize.height as f64 * cw as f64 / ch as f64).round() as u32).clamp(1, 30_000);
|
||||
}
|
||||
let post = match str_p(p, "postRenderAction") {
|
||||
|
||||
Reference in New Issue
Block a user