M9.11: Key Light (Keylight 1.2-equivalent keyer) and mocha shape

Key Light is registered under a generic name (Keylight is a vendor
trademark); lookup() resolves "Keylight (1.2)" to it. mocha shape reads a
documented JSON shape format (Mocha's own export format is not public).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-02 21:11:50 -04:00
co-authored by Claude Opus 5.5
parent 451f63cc0d
commit f95a600722
4 changed files with 708 additions and 3 deletions
+9 -1
View File
@@ -24,8 +24,10 @@ mod generate2;
mod generate3;
mod keying;
mod keying2;
pub mod keylight;
mod matte;
mod misc;
pub mod mocha_shape;
mod noise;
mod noise2;
mod obsolete;
@@ -360,6 +362,8 @@ pub fn registry() -> &'static [EffectSpec] {
v.extend(vr::specs());
v.extend(blur3::specs());
v.extend(distort4::specs());
v.extend(keylight::specs());
v.extend(mocha_shape::specs());
v.extend(time_fx::specs());
v.extend(audio_fx::specs());
v.extend(paint::specs());
@@ -380,7 +384,10 @@ pub fn find(id: &str) -> Option<&'static EffectSpec> {
/// Find by id or (case-insensitive) display name.
pub fn lookup(name_or_id: &str) -> Option<&'static EffectSpec> {
find(name_or_id).or_else(|| registry().iter().find(|s| s.name.eq_ignore_ascii_case(name_or_id)))
find(name_or_id).or_else(|| registry().iter().find(|s| s.name.eq_ignore_ascii_case(name_or_id))).or_else(|| {
// After Effects' third-party display names we register under a generic name.
keylight::KEYLIGHT_ALIASES.iter().any(|a| a.eq_ignore_ascii_case(name_or_id)).then(|| find("ec.keying.keylight")).flatten()
})
}
/// A parameter's default value on a layer of `layer_size` (point defaults are fractions of the
@@ -478,6 +485,7 @@ pub const TIME_DEPENDENT: &[&str] = &[
"ec.vr.digitalglitch",
"ec.blur.camerashakedeblur",
"ec.distort.rollingshutterrepair",
"ec.obsolete.mochashape",
];
/// See [`TIME_DEPENDENT`].