diff --git a/crates/aep/src/import/effects.rs b/crates/aep/src/import/effects.rs index a65a67d58..77d1db32e 100644 --- a/crates/aep/src/import/effects.rs +++ b/crates/aep/src/import/effects.rs @@ -438,7 +438,15 @@ fn import_extra(fx: &AepEffect<'_, '_>, extra: Extra, p: &EffectParam<'_, '_>, h col.lose(LossCategory::Effects, format!("{here}: keyframes or an expression on {} are not imported", p.name)); } let Some(data) = fx.arbitrary_data(&p.match_name) else { - // No data: every value is at its default. + // No record: every value is at its default. A Channel Info value record without its + // aRbs/aRbp payload (every sampled record has it) is damaged: the payload may have chosen + // other channels (`Z`), so the defaults are not what After Effects renders. + if p.stored().is_some() && matches!(extra, Extra::Extractor | Extra::Identifier) { + col.lose( + LossCategory::DamagedData, + format!("{here}: the Channel Info data is missing (a value record without its data), the default channels used"), + ); + } return; }; let mut set = |id: &str, v: f64| { diff --git a/crates/aep/tests/it/import/effects_thirdparty.rs b/crates/aep/tests/it/import/effects_thirdparty.rs index e7e00dd77..567d77642 100644 --- a/crates/aep/tests/it/import/effects_thirdparty.rs +++ b/crates/aep/tests/it/import/effects_thirdparty.rs @@ -270,13 +270,16 @@ fn identifier_names_without_a_terminator_or_in_invalid_utf8_are_refused() { } /// A Channel Info value record without its arbitrary data (no `aRbs`): the effect still imports, -/// with the defaults, and nothing panics. +/// with the defaults, nothing panics, and the missing data is reported as damaged (it may have +/// chosen other channels, so the defaults are not what After Effects renders). #[test] -fn a_missing_channel_info_payload_leaves_the_defaults() { +fn a_missing_channel_info_payload_is_reported_and_leaves_the_defaults() { let mut fx = extractor(vec![], vec![]); fx.data.clear(); let (g, r) = run(&fx, "ec.3d.extractor"); assert_eq!(losses(&r, LossCategory::Effects, "EXtractoR"), Vec::::new()); + let found = losses(&r, LossCategory::DamagedData, "EXtractoR"); + assert!(found.len() == 1 && found[0].contains("Channel Info data is missing"), "{found:?}"); let g = g.expect("imported"); for (id, want) in [("red", "R"), ("green", "G"), ("blue", "B"), ("alpha", "A")] { assert_eq!(v(&g, id), Value::Str(want.into()), "{id}"); @@ -285,6 +288,8 @@ fn a_missing_channel_info_payload_leaves_the_defaults() { fx.data.clear(); let (g, r) = run(&fx, "ec.3d.identifier"); assert_eq!(losses(&r, LossCategory::Effects, "IDentifier"), Vec::::new()); + let found = losses(&r, LossCategory::DamagedData, "IDentifier"); + assert!(found.len() == 1 && found[0].contains("Channel Info data is missing"), "{found:?}"); let g = g.expect("imported"); assert_eq!(v(&g, "channelType"), Value::Enum(0)); near(&g, "id", 5.0);