mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-06 18:41:26 +00:00
After Effects 2026 accepts 0 to 200 for Brush Size of both effects (a script setting 201 is refused with "out of range 0 to 200"); the range here ended at 50. The slider keeps its 0 to 50 travel; larger values are typed. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0f94a1f983
commit
ee7c51740d
2 files changed
+18
-2
No files matched your search
@@ -83,7 +83,7 @@ pub fn specs() -> Vec<EffectSpec> {
|
||||
check("allMasks", "All Masks", false),
|
||||
check("strokeSequentially", "Stroke Sequentially", true),
|
||||
p("color", "Color", col(1.0, 1.0, 1.0), ParamUi::Color),
|
||||
p("brushSize", "Brush Size", num(2.0), slider(0.0, 50.0, 0.0, 50.0, 1)),
|
||||
p("brushSize", "Brush Size", num(2.0), slider(0.0, 200.0, 0.0, 50.0, 1)),
|
||||
p("brushHardness", "Brush Hardness", num(75.0), pct()),
|
||||
p("opacity", "Opacity", num(100.0), pct()),
|
||||
p("start", "Start", num(0.0), pct()),
|
||||
@@ -132,7 +132,7 @@ pub fn specs() -> Vec<EffectSpec> {
|
||||
vec![
|
||||
p("brushPosition", "Brush Position", pt(0.5, 0.5), ParamUi::Point),
|
||||
p("color", "Color", col(1.0, 1.0, 1.0), ParamUi::Color),
|
||||
p("brushSize", "Brush Size", num(6.0), slider(0.0, 50.0, 0.0, 50.0, 1)),
|
||||
p("brushSize", "Brush Size", num(6.0), slider(0.0, 200.0, 0.0, 50.0, 1)),
|
||||
p("brushHardness", "Brush Hardness", num(75.0), pct()),
|
||||
p("brushOpacity", "Brush Opacity", num(100.0), pct()),
|
||||
p("strokeLength", "Stroke Length (secs)", num(0.0), slider(0.0, 30.0, 0.0, 30.0, 1)),
|
||||
|
||||
@@ -197,6 +197,22 @@ fn write_on_and_glue_gun_draw_at_brush() {
|
||||
assert_eq!(g.img.get(0, 0), src.get(0, 0));
|
||||
}
|
||||
|
||||
/// #2980: Brush Size of Write-on and Stroke goes up to 200 px as in After Effects (read back from
|
||||
/// After Effects 2026: setting 201 is refused with "out of range 0 to 200"), and a brush that
|
||||
/// wide paints that wide.
|
||||
#[test]
|
||||
fn brush_size_goes_up_to_200() {
|
||||
for id in ["ec.generate.writeon", "ec.generate.stroke"] {
|
||||
let spec = crate::find(id).unwrap();
|
||||
let size = spec.params.iter().find(|p| p.id == "brushSize").unwrap();
|
||||
assert!(matches!(size.ui, ParamUi::Slider { min, max, .. } if min == 0.0 && max == 200.0), "{id}: {:?}", size.ui);
|
||||
}
|
||||
let set = [("brushSize", num(120.0)), ("brushHardness", num(100.0)), ("brushPosition", Value::Vec2([128.0, 128.0]))];
|
||||
let wide = run("ec.generate.writeon", &set, Image::new(256, 256));
|
||||
assert!(wide.img.get(128 + 55, 128)[3] > 0.9, "radius 60 reaches 55 px from the centre");
|
||||
assert!(wide.img.get(128 + 70, 128)[3] == 0.0);
|
||||
}
|
||||
|
||||
/// #536: an animated Brush Position draws a stroke that stays (Stroke Length 0), expires
|
||||
/// after Stroke Length, and lays its dabs Brush Spacing seconds apart.
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user