Never crash: interchange export/import without expect()
Removes the six expect() calls from timeline export/import and denies the panic lints in the crate. A precomp layer whose source item is not a composition (a damaged project, or an item that was deleted) made export panic in Exporter::sequence; it now leaves that layer out. Exporter::sequence and track_item return Option, the Motion/Opacity/Volume effect defaults come from effect_or_new (None if FilmCraft's registry lacks one), and import's motion() skips a layer without a transform group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
10644a83aa
commit
ed54a8cd15
@@ -434,7 +434,7 @@ impl Importer<'_> {
|
||||
}
|
||||
let fit = if ti.scale_to_frame && size.0 > 0 && size.1 > 0 { (comp.width as f64 / size.0 as f64).min(comp.height as f64 / size.1 as f64) } else { 1.0 };
|
||||
let lc = l.clone();
|
||||
let tr = l.transform_mut().expect("transform");
|
||||
let Some(tr) = l.transform_mut() else { return };
|
||||
// Position / anchor (NaN = centred).
|
||||
for (src, dst) in [("position", "position"), ("anchor", "anchor")] {
|
||||
let Some(p) = m.param(src) else { continue };
|
||||
|
||||
Reference in New Issue
Block a user