mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 14:38:21 -06:00
S2.44: confidence on the Roto Brush span bar
Frames a tracker followed are coloured by its confidence (green, amber, red; slate where the object was absent) and drawn taller; roto_trust reports them. Not checked visually: no headless way to track without weights in a snapshot. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
0e0db685bf
commit
1ae5bb9839
@@ -838,6 +838,25 @@ impl Session {
|
||||
changed
|
||||
}
|
||||
|
||||
/// How far to trust the frames a tracker followed (SAM 2), by layer frame: its confidence and
|
||||
/// whether the object was absent. Frames the classic engine made have no entry.
|
||||
pub fn roto_trust(&self, comp: ItemId, layer: LayerId, effect: Uid) -> BTreeMap<i64, fx::FrameTrust> {
|
||||
let mut out = BTreeMap::new();
|
||||
let Some(c) = self.project.comp(comp) else { return out };
|
||||
let Some(l) = c.layer(layer) else { return out };
|
||||
let Some(g) = l.props.find_group(effect) else { return out };
|
||||
if is_object_matte(g) {
|
||||
return out;
|
||||
}
|
||||
let ch = fx::Chain::new(¶ms_static(g), layer_size(&self.project, c, l), c.frame_rate.as_f64(), 1.0);
|
||||
for f in ch.keys.keys() {
|
||||
if let Some(t) = ch.trust_at(*f) {
|
||||
out.insert(*f, t);
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// The computed frames of an instance (full resolution), by layer frame.
|
||||
pub fn roto_computed(&self, comp: ItemId, layer: LayerId, effect: Uid) -> BTreeMap<i64, bool> {
|
||||
let mut out = BTreeMap::new();
|
||||
|
||||
Reference in New Issue
Block a user