mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-19 16:45:28 +00:00
#3466: Sharpen Amount takes After Effects' 0..4000 range
The hard range was 0..500, so prop.set and the value editors clamped values After Effects accepts (its recorded valid range is 0..4000; the 0..100 slider and the default are unchanged). The engine range test now covers both ends through prop.set, undo/redo, save/reopen and projects saved with the old range, and the recorded-range guard no longer lists Sharpen as narrower.
This commit is contained in:
3 files changed
+15
-2
No files matched your search
@@ -729,7 +729,6 @@ mod tests {
|
||||
("ec.obsolete.gaussianlegacy", "blurriness", 3463),
|
||||
("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),
|
||||
|
||||
@@ -794,7 +794,7 @@ pub fn specs() -> Vec<EffectSpec> {
|
||||
],
|
||||
radial,
|
||||
),
|
||||
spec("ec.blur.sharpen", "Sharpen", "Blur & Sharpen", vec![p("amount", "Sharpen Amount", num(0.0), slider(0.0, 500.0, 0.0, 100.0, 0))], sharpen),
|
||||
spec("ec.blur.sharpen", "Sharpen", "Blur & Sharpen", vec![p("amount", "Sharpen Amount", num(0.0), slider(0.0, 4000.0, 0.0, 100.0, 0))], sharpen),
|
||||
spec(
|
||||
"ec.blur.unsharp",
|
||||
"Unsharp Mask",
|
||||
@@ -1036,6 +1036,19 @@ mod tests {
|
||||
assert_ne!(row(2.0), row(2.4));
|
||||
}
|
||||
|
||||
/// #3466: Sharpen Amount takes After Effects' valid range, 0..4000, and keeps its 0..100
|
||||
/// slider. `prop.set` and the value editors clamp to the hard range.
|
||||
#[test]
|
||||
fn sharpen_amount_takes_the_after_effects_range() {
|
||||
let spec = crate::find("ec.blur.sharpen").unwrap();
|
||||
let ui = &spec.params.iter().find(|p| p.id == "amount").unwrap().ui;
|
||||
assert!(
|
||||
matches!(ui, ParamUi::Slider { min, max, slider_min, slider_max, .. }
|
||||
if *min == 0.0 && *max == 4000.0 && *slider_min == 0.0 && *slider_max == 100.0),
|
||||
"{ui:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fractional_box_blur_radius_is_continuous() {
|
||||
let row = |v| blurred_row("ec.blur.fastbox", "radius", v);
|
||||
|
||||
@@ -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),
|
||||
(3466, "ec.blur.sharpen", "amount", 0.0, 4000.0),
|
||||
];
|
||||
|
||||
fn path(effect: &str, param: &str) -> String {
|
||||
|
||||
Reference in new issue
Block a user