M9.2: effects batch 2 (keying, matte, channel, stylize, noise, perspective, transitions, utility)
Adds 105 effects in new modules (keying, matte, channel, blur2, color2, stylize2, noise, generate2, distort2, perspective, transition, utility) plus shared plane/morphology/guided-filter helpers in util.rs, with 96 new unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
808cd490cd
commit
4c3b92723b
@@ -6,11 +6,24 @@
|
||||
//! [`instantiate`]), so parameters animate, take expressions and are addressable like any other
|
||||
//! property.
|
||||
|
||||
mod blur2;
|
||||
mod channel;
|
||||
mod color2;
|
||||
mod color_fx;
|
||||
mod controls;
|
||||
mod distort;
|
||||
mod distort2;
|
||||
mod generate;
|
||||
mod generate2;
|
||||
mod keying;
|
||||
mod matte;
|
||||
mod misc;
|
||||
mod noise;
|
||||
mod perspective;
|
||||
mod stylize2;
|
||||
mod transition;
|
||||
pub mod util;
|
||||
mod utility;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::OnceLock;
|
||||
@@ -77,6 +90,13 @@ impl Params {
|
||||
pub fn e(&self, id: &str) -> u32 {
|
||||
self.values.get(id).map(Value::as_enum).unwrap_or(0)
|
||||
}
|
||||
/// String parameter (`Value::Str`), empty when missing or of another kind.
|
||||
pub fn s(&self, id: &str) -> &str {
|
||||
match self.values.get(id) {
|
||||
Some(Value::Str(s)) => s,
|
||||
_ => "",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A layer image in flight: layer-space point `p` sits at pixel `p * scale + offset`.
|
||||
@@ -155,6 +175,18 @@ pub fn registry() -> &'static [EffectSpec] {
|
||||
v.extend(generate::specs());
|
||||
v.extend(distort::specs());
|
||||
v.extend(controls::specs());
|
||||
v.extend(keying::specs());
|
||||
v.extend(matte::specs());
|
||||
v.extend(channel::specs());
|
||||
v.extend(blur2::specs());
|
||||
v.extend(color2::specs());
|
||||
v.extend(stylize2::specs());
|
||||
v.extend(noise::specs());
|
||||
v.extend(generate2::specs());
|
||||
v.extend(distort2::specs());
|
||||
v.extend(perspective::specs());
|
||||
v.extend(transition::specs());
|
||||
v.extend(utility::specs());
|
||||
v.sort_by(|a, b| a.category.cmp(b.category).then(a.name.cmp(b.name)));
|
||||
v
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user