mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-29 20:47:18 -06:00
Project: reads_markers stops at the first expression and allocates nothing
It runs for every frame identity and disk-cache key; walk() formatted a path per node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
1fde74b5f2
commit
3d45065add
@@ -102,15 +102,15 @@ impl Project {
|
||||
/// `nearestKey`...). Only then do the markers of comps and layers affect what is rendered, so
|
||||
/// frame caches ignore them otherwise.
|
||||
pub fn reads_markers(&self) -> bool {
|
||||
let mut found = false;
|
||||
for (_, c) in self.comps() {
|
||||
for l in &c.layers {
|
||||
if !found {
|
||||
l.props.walk("", &mut |_, p| found |= p.expr.is_some());
|
||||
}
|
||||
}
|
||||
// Called for every frame identity and disk-cache key: stops at the first expression and
|
||||
// builds no paths (`PropGroup::walk` formats one per node).
|
||||
fn any_expr(g: &crate::PropGroup) -> bool {
|
||||
g.children.iter().any(|c| match c {
|
||||
crate::Node::Prop(p) => p.expr.is_some(),
|
||||
crate::Node::Group(sub) => any_expr(sub),
|
||||
})
|
||||
}
|
||||
found
|
||||
self.comps().any(|(_, c)| c.layers.iter().any(|l| any_expr(&l.props)))
|
||||
}
|
||||
|
||||
/// Allocate an id (items, layers and property uids share one counter).
|
||||
|
||||
Reference in New Issue
Block a user