#3467: Radial Blur Amount takes After Effects' range 0..1000

After Effects records 0..1000 for Radial Blur's Amount (slider 0..100);
EffectCraft's hard range stopped at 100, so prop.set and the value
editors clamped 200 to 100. The hard maximum is now 1000; the slider
range and default are unchanged.

The engine range test covers prop.set at both ends, undo and redo, save
and reopen, and a project saved with the old range. The parameter leaves
the .aep range guard's list of known narrower ranges.
This commit is contained in:
arnav-hiwarkar
2026-11-17 16:09:29 +05:30
parent aeedb92ef2
commit d918aa6e13
3 changed files with 27 additions and 2 deletions
-1
View File
@@ -730,7 +730,6 @@ mod tests {
("ec.perspective.dropshadow", "softness", 3464),
("ec.blur.compound", "maximumBlur", 3465),
("ec.blur.sharpen", "amount", 3466),
("ec.blur.radial", "amount", 3467),
("ec.blur.ccradial", "amount", 3468),
("ec.distort.turbulentdisplace", "amount", 3469),
("ec.time.pixelmotionblur", "shutterAngle", 3481),
+26 -1
View File
@@ -786,7 +786,8 @@ pub fn specs() -> Vec<EffectSpec> {
"Radial Blur",
"Blur & Sharpen",
vec![
p("amount", "Amount", num(10.0), slider(0.0, 100.0, 0.0, 100.0, 1)),
// After Effects accepts 0..1000; its slider shows 0..100 (#3467).
p("amount", "Amount", num(10.0), slider(0.0, 1000.0, 0.0, 100.0, 1)),
p("center", "Center", Value::Vec2([0.5, 0.5]), ParamUi::Point),
p("type", "Type", Value::Enum(0), popup(&["Spin", "Zoom"])),
// Our blur is always fully anti-aliased; the choice is kept for compatibility.
@@ -1147,6 +1148,30 @@ mod tests {
}
}
/// Spin and Zoom at both ends of Amount (0..1000) and both Antialiasing settings give finite
/// colours over an opaque layer and keep it opaque (#3467).
#[test]
fn radial_blur_is_finite_across_the_amount_range() {
let mut img = effectcraft_raster::Image::new(48, 40);
img.rows_mut().for_each(|(y, row)| {
for (x, px) in row.iter_mut().enumerate() {
*px = [x as f32 / 47.0, y as f32 / 39.0, 0.5, 1.0];
}
});
for ty in 0..2 {
for aa in 0..2 {
for amount in [0.0, 100.0, 200.0, 1000.0] {
let vals = [("amount", num(amount)), ("type", Value::Enum(ty)), ("center", Value::Vec2([10.0, 30.0])), ("antialiasing", Value::Enum(aa))];
let o = run_fx("ec.blur.radial", &vals, img.clone(), 0.0, EffectEnv::default());
assert_eq!((o.img.width, o.img.height), (48, 40));
for p in &o.img.data {
assert!(p.iter().all(|v| v.is_finite()) && (p[3] - 1.0).abs() < 1e-5, "type {ty} aa {aa} amount {amount}: {p:?}");
}
}
}
}
}
/// After Effects 2026, Venetian Blinds Completion 40, Direction 30, Width 50, Feather 5 on
/// an opaque 480 × 270 layer: alpha (0..255) along row y = 135. The transparent band starts
/// at the layer centre's phase, both edges are Gaussian (σ = Feather / 2).
+1
View File
@@ -60,6 +60,7 @@ const ROWS: &[(u32, &str, &str, f64, f64)] = &[
(3471, "ec.distort.transform", "scaleHeight", -30000.0, 30000.0),
(3471, "ec.distort.transform", "scaleWidth", -30000.0, 30000.0),
(3470, "ec.distort.turbulentdisplace", "evolutionOptions/randomSeed", 0.0, 100000.0),
(3467, "ec.blur.radial", "amount", 0.0, 1000.0),
];
fn path(effect: &str, param: &str) -> String {