FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust
Merge #2597: Centre Transform's auto points in the clip's picture on apply and reset (#2588)
aionggdd270d211356
diff --cc crates/engine/src/commands.rsindex d784d9320,9687881f4..f675f1d18--- a/crates/engine/src/commands.rs+++ b/crates/engine/src/commands.rs@@@ -3077,11 -2955,14 +3077,17 @@@ fn build() -> Vec<CommandSpec>}let (fw, fh) = s.active_sequence().map(|q| (q.settings.width, q.settings.height)).unwrap_or((1920, 1080));let label = format!("Apply {}", def.name);+ // standard effects run on the clip's source picture, so "auto" points (the centre) are+ // measured in it, not in the sequence frame+ let source_sizes: std::collections::BTreeMap<ClipId, (u32, u32)> = s+ .active_sequence()+ .map(|q| clips.iter().filter_map(|c| q.find_item(*c).and_then(|(_, i)| s.project.source_size(i.item)).map(|sz| (*c, sz))).collect())+ .unwrap_or_default();- s.edit_sequence(&label, |q, _, _| {- let mut n = 0;+ // Answer `{"applied":[{"clip","index","effect"}]}`: where each instance landed, so an+ // agent can address it (`effects.setParam`, `effects.remove`) without a `sequence_inspect`+ // round trip, as `timeline.place` answers with its clips (#1545).+ let applied = s.edit_sequence(&label, |q, _, _| {+ let mut applied = Vec::new();for t in q.all_tracks_mut() {if (t.kind == TrackKind::Audio) != is_audio {continue;