mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 09:05:51 +00:00
Footage cache (#3271): channel selection is static, and only the channels picked are read
The parameters that pick which channels or Cryptomatte layer an effect reads (EXtractoR's Red/Green/Blue/Alpha, Cryptomatte's Layer and Layer Name, 3D Channel Extract's 3D Channel, ID Matte's Aux. Channel and Use Coverage, IDentifier's Channel Type) are static, as in After Effects where they have no stopwatch: no keyframes, no expression (prop.addKey, prop.toggleKey, prop.toggleAnimation and prop.setExpression refuse; prop.set changes the value). A document or an import that animated one keeps its first value and says so (a toast on open, a loss on .aep import). With that, what a frame reads is known from the values alone: the 'all channels' fallbacks for moving parameters and for effects that don't declare are gone (every channel effect declares; a test holds them to it), and a layer whose effects read no channels asks for none. Tests: the parameters refuse keys and expressions and the need is exactly the channel picked; a keyed channel selection opens static with its first value and is reported (both fail on the old code); the migration keeps the first key's value.
This commit is contained in:
1 parent
f21b7d2a8f
commit
c3464f640f
12 files changed
+231
-29
No files matched your search
@@ -253,8 +253,8 @@ impl<'a> Renderer<'a> {
|
||||
}
|
||||
|
||||
/// What the enabled effects of `layer` read of its auxiliary channels at the context time
|
||||
/// ([`effectcraft_effects::aux_needs`], #3271): the union of their lookups, or all channels
|
||||
/// when one doesn't say (or none reads them).
|
||||
/// ([`effectcraft_effects::aux_needs`], #3271): the union of their lookups (none when no
|
||||
/// effect reads them).
|
||||
pub fn layer_aux_need(&self, ctx: &EvalCtx, layer: &Layer) -> effectcraft_raster::channels3d::AuxNeed {
|
||||
use effectcraft_raster::channels3d::AuxNeed;
|
||||
let mut need: Option<AuxNeed> = None;
|
||||
@@ -264,13 +264,13 @@ impl<'a> Renderer<'a> {
|
||||
continue;
|
||||
}
|
||||
let params = effectcraft_effects::flatten_params(g, &mut |pr| ctx.value(layer, pr));
|
||||
let one = effectcraft_effects::aux_needs(effect, ¶ms).map_or(AuxNeed::All, AuxNeed::Lookups);
|
||||
let one = effectcraft_effects::aux_need(effect, ¶ms);
|
||||
need = Some(match need {
|
||||
Some(n) => n.union(one),
|
||||
None => one,
|
||||
});
|
||||
}
|
||||
need.unwrap_or_default()
|
||||
need.unwrap_or(AuxNeed::Lookups(vec![]))
|
||||
}
|
||||
|
||||
/// Evaluation context of comp `comp_id` at comp time `t`.
|
||||
|
||||
Reference in new issue
Block a user