forge
Explore
Log in

Don't you dare go Hollow

Merge branch 'worktree-agent-a42dde9bd97d5931e'

Browse files at this commit

26a1448f091e9fd554ae4ffe9fc05f27fc806ec9Ahmet Kaan GümüşParent: 24f7908b3755d5
MCP.mdmodified+8 -2
@@ -224,7 +224,7 @@ in **bold**; optional ones follow the name.
224 | `project_collect` | folder | copies every file the project plays into `folder` (default `<project stem>_media` beside the project file, made if missing) and points the project at the copies; one undo step, unsaved until `project_save`. Skips generated sources, names and skips missing files, leaves sources already in the folder, renames clashes to `name-2.ext`, reuses identical bytes already there. A failed copy changes nothing. The window's File > Collect media does the same, with progress and cancel |224 | `project_collect` | folder | copies every file the project plays into `folder` (default `<project stem>_media` beside the project file, made if missing) and points the project at the copies; one undo step, unsaved until `project_save`. Skips generated sources, names and skips missing files, leaves sources already in the folder, renames clashes to `name-2.ext`, reuses identical bytes already there. A failed copy changes nothing. The window's File > Collect media does the same, with progress and cancel |
225 | `project_export_timeline` | format, path? | writes the active sequence for another editor: `otio` (OpenTimelineIO: tracks, clips with absolute file paths, gaps, transitions, markers), `fcpxml` (Final Cut Pro XML 1.10, read by Final Cut Pro, Resolve and Premiere) or `edl` (CMX3600: V1 and audio on A1/A2, dissolves as `D`, `FROM CLIP NAME` comments). Default path: beside the project file. Subtitles are left out and the reply says so. Only the file is written; the project does not change. The window's File > Export timeline as does the same into the default export folder |225 | `project_export_timeline` | format, path? | writes the active sequence for another editor: `otio` (OpenTimelineIO: tracks, clips with absolute file paths, gaps, transitions, markers), `fcpxml` (Final Cut Pro XML 1.10, read by Final Cut Pro, Resolve and Premiere) or `edl` (CMX3600: V1 and audio on A1/A2, dissolves as `D`, `FROM CLIP NAME` comments). Default path: beside the project file. Subtitles are left out and the reply says so. Only the file is written; the project does not change. The window's File > Export timeline as does the same into the default export folder |
226 | `project_import_timeline` | path | reads an `.otio` file as a new sequence of the project and makes it the active one; each clip is relinked by its path, and a missing file becomes an offline clip. One undo step, unsaved until `project_save`. The window takes the same file from File > Import timeline (OTIO) or from the command line |226 | `project_import_timeline` | path | reads an `.otio` file as a new sequence of the project and makes it the active one; each clip is relinked by its path, and a missing file becomes an offline clip. One undo step, unsaved until `project_save`. The window takes the same file from File > Import timeline (OTIO) or from the command line |
227-| `project_status` | — | path, saved or dirty, canvas size, fps, duration, lanes with clip counts, sources, undo and redo depth, running exports, settings (and the notes, when there are any); an `OFFLINE: src:N <path>` line per offline source, and the fixes an open made to load (dirty until saved) |227+| `project_status` | — | path, saved or dirty, canvas size, fps, duration, lanes with clip counts, sources, the colour looks (a `looks:` line naming the built-in looks and the saved ones, the names the `look` op takes; `structuredContent` has them as `looks.builtin` and `looks.saved`), undo and redo depth, running exports, settings (and the notes, when there are any); an `OFFLINE: src:N <path>` line per offline source, and the fixes an open made to load (dirty until saved) |
228 | `project_settings` | resolution, fps, tonemap, notes, still_secs, proxies, auto_proxies, encoder, limiter, captions | the `ProjectSettings` knobs. An fps change keeps clips, captions and titles at the same seconds; their frame numbers and addresses change. `notes` is free text (several lines; `""` clears it), saved with the project as format v52; `still_secs` is how long a still is placed for, 0.5 to 600 s, 5 s by default, and only stills placed after the change take it. Both are one undo step each |228 | `project_settings` | resolution, fps, tonemap, notes, still_secs, proxies, auto_proxies, encoder, limiter, captions | the `ProjectSettings` knobs. An fps change keeps clips, captions and titles at the same seconds; their frame numbers and addresses change. `notes` is free text (several lines; `""` clears it), saved with the project as format v52; `still_secs` is how long a still is placed for, 0.5 to 600 s, 5 s by default, and only stills placed after the change take it. Both are one undo step each |
229 | `templates` | (none) | lists the project templates: the built-ins (YouTube 1080p 30, Vertical 1080×1920 30, Square 1080 30) and the ones saved from the window with File > Save as template, each marked built-in or saved and whether it keeps clips |229 | `templates` | (none) | lists the project templates: the built-ins (YouTube 1080p 30, Vertical 1080×1920 30, Square 1080 30) and the ones saved from the window with File > Save as template, each marked built-in or saved and whether it keeps clips |
230 | `checkpoint` | **name** | save the whole project under a name (letters, digits, `-`, `_`), as a copy in `<project dir>/checkpoints/<stem>/` (the project's path, from `project_new {path}` or `project_save`; with no path at all, the temp dir, lost on reboot) |230 | `checkpoint` | **name** | save the whole project under a name (letters, digits, `-`, `_`), as a copy in `<project dir>/checkpoints/<stem>/` (the project's path, from `project_new {path}` or `project_save`; with no path at all, the temp dir, lost on reboot) |
@@ -251,7 +251,7 @@ when decoded. A wider file onto a mono timeline is refused.
251 | tool | args | does |251 | tool | args | does |
252 |---|---|---|252 |---|---|---|
253 | `timeline` | detail (brief\|full), lanes, range, page | the timeline as text (brief lists at most 40 clips per lane, within about 4 KB of text, and says how many more there are; `page` pages one lane 40 clips at a time), one line per clip with its address, span, source, source span (`src 3.0s–15.4s`, the part of the file it plays) and effect flags |253 | `timeline` | detail (brief\|full), lanes, range, page | the timeline as text (brief lists at most 40 clips per lane, within about 4 KB of text, and says how many more there are; `page` pages one lane 40 clips at a time), one line per clip with its address, span, source, source span (`src 3.0s–15.4s`, the part of the file it plays) and effect flags |
254-| `clip_info` | **clip** | everything about one clip: lane, span, source range, speed, fades, transition (kind and length), fit, visualizer, EQ bands, colour, transform, group members, and how far each edge can trim; with `at` (a time inside the clip) also match frame: the source (src:N, file) and source time shown there |254+| `clip_info` | **clip** | everything about one clip: lane, span, source range, speed (a speed ramp lists every key as `at clip 1.000s speed 1.5x`, in clip time, the time the speed_ramp op's `at` takes), gain and its volume envelope (text shows the first 12 gain keys and `(+N more)`; `structuredContent` carries every key as `gain_keys`), pan, pitch and deinterlace (text shows each only when set; JSON always), fades, transition (kind and length), fit, visualizer, EQ bands, colour, transform, group members, and how far each edge can trim; with `at` (a time inside the clip) also match frame: the source (src:N, file) and source time shown there |
255 | `captions` | lane, range, page | cues on caption lanes, in timeline time, one line per cue, 40 to a page. `range` is `{from, to}`: from inclusive, to exclusive, seconds exact (a cue starting at `to` is not listed) |255 | `captions` | lane, range, page | cues on caption lanes, in timeline time, one line per cue, 40 to a page. `range` is `{from, to}`: from inclusive, to exclusive, seconds exact (a cue starting at `to` is not listed) |
256 256
257 `timeline` example (illustrative; real output has the same shape):257 `timeline` example (illustrative; real output has the same shape):
@@ -274,6 +274,12 @@ the file the clip plays. The clip's in and out frames are stored at the timeline
274 rate, so the seconds are `in / fps` and `out / fps`. `clip_info` gives the same span274 rate, so the seconds are `in / fps` and `out / fps`. `clip_info` gives the same span
275 with timecodes and the source's own frame count.275 with timecodes and the source's own frame count.
276 276
277+Readbacks for the audio and picture settings: a lane's header shows its pan
278+(`pan -0.3`) next to its gain, and its JSON has `pan`. An audio clip's row shows
279+`pan` and `pitch +3` and a video clip's row shows `deinterlace field`; brief rows
280+show them only when they are off their defaults, and `detail: full` rows always
281+show them (pan 0, pitch +0, deinterlace frame included), as does the full JSON.
282+
277 ### 4.4 See and hear283 ### 4.4 See and hear
278 284
279 | tool | args | does |285 | tool | args | does |
crates/mcp/src/tools/look.rsmodified+133 -8
@@ -34,12 +34,13 @@ const TIME_DOC: &str = "A time: 450f (frames), 15.0s or 15 (seconds), 01:02.500
34 34
35 const TIMELINE_DOC: &str = "The timeline as text: one block per lane, one line per clip with its \35 const TIMELINE_DOC: &str = "The timeline as text: one block per lane, one line per clip with its \
36 address (LANE@START), timeline span, source file and in/out frames, and any effect flags. \36 address (LANE@START), timeline span, source file and in/out frames, and any effect flags. \
37-Also lists lane gain and mute/hide/lock state, and the gap count per media lane. \37+Also lists lane gain and pan, mute/hide/lock state, and the gap count per media lane. \
38 Use range to read a stretch, and clip_info for everything about one clip.";38 Use range to read a stretch, and clip_info for everything about one clip.";
39 39
40 const CLIP_INFO_DOC: &str = "Everything about one clip: its lane and address, timeline span, source \40 const CLIP_INFO_DOC: &str = "Everything about one clip: its lane and address, timeline span, source \
41-file and in/out frames, speed, fades, dissolve, fit, visualizer, EQ bands, colour, transform, \41+file and in/out frames, speed (a speed ramp lists every key, in clip time), reverse, gain and its \
42-link-group members, and how far each edge can be trimmed. With `at` (a timeline time inside the clip) it also answers match frame: the source file, its src:N number and the source time shown on that frame.";42+volume envelope (every gain key), pan, pitch, deinterlace, fades, dissolve, fit, visualizer, EQ bands, \
43+colour, transform, link-group members, and how far each edge can be trimmed. With `at` (a timeline time inside the clip) it also answers match frame: the source file, its src:N number and the source time shown on that frame.";
43 44
44 pub fn tools() -> Vec<Tool> {45 pub fn tools() -> Vec<Tool> {
45 vec![46 vec![
@@ -88,7 +89,7 @@ fn timeline_schema() -> Value {
88 "detail": {89 "detail": {
89 "type": "string",90 "type": "string",
90 "enum": ["brief", "full"],91 "enum": ["brief", "full"],
91- "description": "brief (default) caps the text at about 4 KB, shared out equally among the lanes that have clips: each lane lists as many clips as its share holds, never more than 40 (a lane of few clips lists them all), and says how many clips were cut from it (use range, or lanes [one lane] with page, to see them). full lists every clip. structuredContent follows it: brief gives each clip's address, span, link and track; full gives every field (source, in/out, effects) as clip_info does."92+ "description": "brief (default) caps the text at about 4 KB, shared out equally among the lanes that have clips: each lane lists as many clips as its share holds, never more than 40 (a lane of few clips lists them all), and says how many clips were cut from it (use range, or lanes [one lane] with page, to see them). full lists every clip, with its pan, pitch and deinterlace even at their defaults. brief shows those three only when they are set. structuredContent follows it: brief gives each clip's address, span, link and track; full gives every field (source, in/out, effects, pan, pitch, deinterlace) as clip_info does."
92 },93 },
93 "page": {94 "page": {
94 "type": "integer",95 "type": "integer",
@@ -134,6 +135,8 @@ struct LaneView {
134 /// The name the user gave the lane, if any.135 /// The name the user gave the lane, if any.
135 name: Option<String>,136 name: Option<String>,
136 gain_db: f32,137 gain_db: f32,
138+ /// The lane's pan, `-1.0..=1.0`; 0 for the middle and for a lane with no sound.
139+ pan: f32,
137 hidden: bool,140 hidden: bool,
138 muted: bool,141 muted: bool,
139 locked: bool,142 locked: bool,
@@ -189,6 +192,9 @@ impl LaneView {
189 if self.gain_db != 0.0 {192 if self.gain_db != 0.0 {
190 f.push(format!("gain {}dB", num(f64::from(self.gain_db))));193 f.push(format!("gain {}dB", num(f64::from(self.gain_db))));
191 }194 }
195+ if self.pan != 0.0 {
196+ f.push(format!("pan {}", num(f64::from(self.pan))));
197+ }
192 for d in &self.ducks {198 for d in &self.ducks {
193 f.push(duck_text(d));199 f.push(duck_text(d));
194 }200 }
@@ -248,7 +254,7 @@ fn timeline(server: &mut Server, args: &Value) -> Reply {
248 Some(w) => known.iter().copied().filter(|l| w.contains(l)).collect(),254 Some(w) => known.iter().copied().filter(|l| w.contains(l)).collect(),
249 };255 };
250 256
251- let mut views: Vec<LaneView> = shown.iter().map(|&l| lane_view(s, l, fps, range)).collect();257+ let mut views: Vec<LaneView> = shown.iter().map(|&l| lane_view(s, l, fps, range, full)).collect();
252 if let (Some(number), [view]) = (page, views.as_mut_slice()) {258 if let (Some(number), [view]) = (page, views.as_mut_slice()) {
253 let lp = LanePage::of(number, view.rows.len());259 let lp = LanePage::of(number, view.rows.len());
254 if number > lp.pages {260 if number > lp.pages {
@@ -334,6 +340,7 @@ fn timeline(server: &mut Server, args: &Value) -> Reply {
334 "lane": parse::lane_name(v.lane),340 "lane": parse::lane_name(v.lane),
335 "name": v.name,341 "name": v.name,
336 "gain_db": v.gain_db,342 "gain_db": v.gain_db,
343+ "pan": v.pan,
337 "hidden": v.hidden,344 "hidden": v.hidden,
338 "muted": v.muted,345 "muted": v.muted,
339 "locked": v.locked,346 "locked": v.locked,
@@ -566,15 +573,16 @@ fn lanes_arg(args: &Value, known: &[Lane]) -> Result<Option<Vec<Lane>>, Reply> {
566 Ok(Some(wanted))573 Ok(Some(wanted))
567 }574 }
568 575
569-fn lane_view(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>) -> LaneView {576+fn lane_view(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>, full: bool) -> LaneView {
570 let rows = match lane.kind {577 let rows = match lane.kind {
571 LaneKind::Subtitle => sub_rows(s, lane, fps, range),578 LaneKind::Subtitle => sub_rows(s, lane, fps, range),
572- _ => media_rows(s, lane, fps, range),579+ _ => media_rows(s, lane, fps, range, full),
573 };580 };
574 LaneView {581 LaneView {
575 lane,582 lane,
576 name: s.lane_name(lane).map(str::to_string),583 name: s.lane_name(lane).map(str::to_string),
577 gain_db: s.lane_gain_db(lane),584 gain_db: s.lane_gain_db(lane),
585+ pan: s.lane_pan(lane),
578 hidden: s.lane_hidden(lane),586 hidden: s.lane_hidden(lane),
579 muted: s.lane_muted(lane),587 muted: s.lane_muted(lane),
580 locked: s.lane_locked(lane),588 locked: s.lane_locked(lane),
@@ -619,7 +627,7 @@ fn duck_json(d: Option<&Duck>) -> Value {
619 })627 })
620 }628 }
621 629
622-fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>) -> Vec<Row> {630+fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>, full: bool) -> Vec<Row> {
623 let mut rows = Vec::new();631 let mut rows = Vec::new();
624 // Sources whose file is not on disk: a clip on one is marked, since its picture or sound is missing.632 // Sources whose file is not on disk: a clip on one is marked, since its picture or sound is missing.
625 let offline: Vec<usize> = s.offline_sources().iter().map(|(i, _)| *i).collect();633 let offline: Vec<usize> = s.offline_sources().iter().map(|(i, _)| *i).collect();
@@ -665,6 +673,22 @@ fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32
665 if keys > 0 {673 if keys > 0 {
666 body.push_str(&format!(" keys {keys}"));674 body.push_str(&format!(" keys {keys}"));
667 }675 }
676+ // Pan and pitch belong to audio clips, deinterlace to video clips. Full detail shows them
677+ // always; brief shows only the ones set off their default.
678+ let (pan, pitch, deint) = (
679+ s.clip_pan_of(lane, idx).unwrap_or(0.0),
680+ s.clip_pitch_of(lane, idx).unwrap_or(0),
681+ s.deinterlace_of(lane, idx),
682+ );
683+ if lane.kind == LaneKind::Audio && (full || pan != 0.0) {
684+ body.push_str(&format!(" pan {}", num(f64::from(pan))));
685+ }
686+ if lane.kind == LaneKind::Audio && (full || pitch != 0) {
687+ body.push_str(&format!(" pitch {pitch:+}"));
688+ }
689+ if lane.kind == LaneKind::Video && (full || deint != engine::project::Deinterlace::Frame) {
690+ body.push_str(&format!(" deinterlace {}", deint.name()));
691+ }
668 let (okeys, ckeys) = (s.opacity_keys_of(lane, idx).len(), s.color_keys_of(lane, idx).len());692 let (okeys, ckeys) = (s.opacity_keys_of(lane, idx).len(), s.color_keys_of(lane, idx).len());
669 if okeys > 0 {693 if okeys > 0 {
670 body.push_str(&format!(" opacity keys {okeys}"));694 body.push_str(&format!(" opacity keys {okeys}"));
@@ -708,6 +732,9 @@ fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32
708 "opacity_keys": okeys,732 "opacity_keys": okeys,
709 "color_keys": ckeys,733 "color_keys": ckeys,
710 "env": !c.gain_keys.is_empty(),734 "env": !c.gain_keys.is_empty(),
735+ "pan": pan,
736+ "pitch": pitch,
737+ "deinterlace": deint.name(),
711 "visualizer": c.visualizer != 0,738 "visualizer": c.visualizer != 0,
712 });739 });
713 rows.push(Row {740 rows.push(Row {
@@ -834,6 +861,7 @@ impl LaneView {
834 lane,861 lane,
835 name: None,862 name: None,
836 gain_db: 0.0,863 gain_db: 0.0,
864+ pan: 0.0,
837 hidden: false,865 hidden: false,
838 muted: false,866 muted: false,
839 locked: false,867 locked: false,
@@ -1004,6 +1032,41 @@ fn effect_keys_json(c: &Clip, fps: f64, effects: &[Effect]) -> Value {
1004 )1032 )
1005 }1033 }
1006 1034
1035+/// A speed ramp's keys, one line each: the clip-relative time they sit at, which is the time the
1036+/// speed_ramp op's `at` takes, and the speed there.
1037+fn speed_key_lines(fps: f64, keys: &[engine::project::SpeedKey]) -> Vec<String> {
1038+ keys.iter()
1039+ .map(|k| format!(" at clip {:.3}s speed {}x", f64::from(k.at) / fps, num(k.speed.as_f64())))
1040+ .collect()
1041+}
1042+
1043+/// The speed ramp as JSON, every key: its clip-relative time in seconds and its speed.
1044+fn speed_keys_json(fps: f64, keys: &[engine::project::SpeedKey]) -> Value {
1045+ Value::Array(
1046+ keys.iter()
1047+ .map(|k| json!({"clip_time": f64::from(k.at) / fps, "speed": k.speed.as_f64()}))
1048+ .collect(),
1049+ )
1050+}
1051+
1052+/// The volume envelope as JSON, every point (the text cuts it short): its timeline time, its
1053+/// source frame, its dB and the ease that leaves it.
1054+fn gain_keys_json(c: &Clip, fps: f64) -> Value {
1055+ Value::Array(
1056+ c.gain_keys
1057+ .iter()
1058+ .map(|k| {
1059+ json!({
1060+ "time": timeline_of(c, k.at) / fps,
1061+ "source_frame": k.at,
1062+ "db": k.db,
1063+ "ease": k.ease.name(),
1064+ })
1065+ })
1066+ .collect(),
1067+ )
1068+}
1069+
1007 fn opacity_keys_json(c: &Clip, fps: f64, keys: &[OpacityKey]) -> Value {1070 fn opacity_keys_json(c: &Clip, fps: f64, keys: &[OpacityKey]) -> Value {
1008 Value::Array(1071 Value::Array(
1009 keys.iter()1072 keys.iter()
@@ -1324,6 +1387,30 @@ fn media_info(s: &PlaybackSession, lane: Lane, idx: usize, fps: f64) -> Reply {
1324 if c.gain_db != 0.0 {1387 if c.gain_db != 0.0 {
1325 lines.push(format!("gain {}dB", num(f64::from(c.gain_db))));1388 lines.push(format!("gain {}dB", num(f64::from(c.gain_db))));
1326 }1389 }
1390+ // Pan, pitch and deinterlace, each shown only when it is off its default.
1391+ let (pan, pitch, deint) = (
1392+ s.clip_pan_of(lane, idx).unwrap_or(0.0),
1393+ s.clip_pitch_of(lane, idx).unwrap_or(0),
1394+ s.deinterlace_of(lane, idx),
1395+ );
1396+ let mut tweaks = Vec::new();
1397+ if pan != 0.0 {
1398+ tweaks.push(format!("pan {}", num(f64::from(pan))));
1399+ }
1400+ if pitch != 0 {
1401+ tweaks.push(format!("pitch {pitch:+} semitones"));
1402+ }
1403+ if deint != engine::project::Deinterlace::Frame {
1404+ tweaks.push(format!("deinterlace {}", deint.name()));
1405+ }
1406+ if !tweaks.is_empty() {
1407+ lines.push(tweaks.join(" · "));
1408+ }
1409+ // Every key of a speed ramp, so the ramp can be read and edited key by key.
1410+ if !c.speed_keys.is_empty() {
1411+ lines.push(format!("speed keys: {}", c.speed_keys.len()));
1412+ lines.extend(speed_key_lines(fps, &c.speed_keys));
1413+ }
1327 // The volume envelope, in timeline times; only an audio clip can have one.1414 // The volume envelope, in timeline times; only an audio clip can have one.
1328 if !c.gain_keys.is_empty() {1415 if !c.gain_keys.is_empty() {
1329 lines.push(format!(1416 lines.push(format!(
@@ -1399,6 +1486,12 @@ fn media_info(s: &PlaybackSession, lane: Lane, idx: usize, fps: f64) -> Reply {
1399 "duck": duck_json(ducks.first()),1486 "duck": duck_json(ducks.first()),
1400 "ducks": ducks_json(&ducks),1487 "ducks": ducks_json(&ducks),
1401 "voice": voice_json_of(&voice),1488 "voice": voice_json_of(&voice),
1489+ "pan": pan,
1490+ "pitch": pitch,
1491+ "deinterlace": deint.name(),
1492+ "speed_keys": speed_keys_json(fps, &c.speed_keys),
1493+ "gain_db": c.gain_db,
1494+ "gain_keys": gain_keys_json(c, fps),
1402 });1495 });
1403 Reply::ok(lines.join("\n")).with(structured)1496 Reply::ok(lines.join("\n")).with(structured)
1404 }1497 }
@@ -2213,6 +2306,38 @@ mod tests {
2213 assert!(tl.text.contains("speed ramp 1.00x→2.00x (3 keys)"), "{}", tl.text);2306 assert!(tl.text.contains("speed ramp 1.00x→2.00x (3 keys)"), "{}", tl.text);
2214 }2307 }
2215 2308
2309+ #[test]
2310+ fn clip_info_reads_back_pan_pitch_deinterlace_and_every_ramp_key() {
2311+ let mut srv = server();
2312+ let r = crate::tools::edit::run_edit(
2313+ &mut srv,
2314+ &json!({"ops": [
2315+ {"op": "pan", "clip": "A1#0", "pan": -0.5},
2316+ {"op": "pitch", "clip": "A1#0", "semitones": 3},
2317+ {"op": "deinterlace", "clip": "V1#0", "mode": "field"},
2318+ {"op": "speed_ramp", "clip": "V1#0", "keys": [
2319+ {"at": "0s", "speed": 1.0}, {"at": "1s", "speed": 1.5}, {"at": "2s", "speed": 2.0}
2320+ ]}
2321+ ]}),
2322+ );
2323+ assert!(!r.is_error, "{}", r.text);
2324+ let audio = call(&mut srv, "clip_info", json!({"clip": "A1#0"}));
2325+ assert!(audio.text.contains("pan -0.5 · pitch +3 semitones"), "{}", audio.text);
2326+ assert_eq!(audio.structured.as_ref().unwrap()["pan"], -0.5);
2327+ assert_eq!(audio.structured.as_ref().unwrap()["pitch"], 3);
2328+ let video = call(&mut srv, "clip_info", json!({"clip": "V1#0"}));
2329+ assert!(video.text.contains("deinterlace field"), "{}", video.text);
2330+ assert!(video.text.contains("speed keys: 3\n at clip 0.000s speed 1x\n at clip 1.000s speed 1.5x\n at clip 2.000s speed 2x"), "{}", video.text);
2331+ let v = video.structured.as_ref().unwrap();
2332+ assert_eq!(v["deinterlace"], "field");
2333+ assert_eq!(v["speed_keys"].as_array().unwrap().len(), 3);
2334+ assert_eq!(v["speed_keys"][1]["clip_time"], 1.0);
2335+ // Brief timeline rows name a pitch that is set, and leave out a deinterlace at its default.
2336+ let tl = call(&mut srv, "timeline", json!({}));
2337+ assert!(tl.text.contains("pitch +3"), "{}", tl.text);
2338+ assert!(!tl.text.contains("deinterlace frame"), "{}", tl.text);
2339+ }
2340+
2216 #[test]2341 #[test]
2217 fn reverse_toggles_with_on_and_shows_in_clip_info_and_timeline() {2342 fn reverse_toggles_with_on_and_shows_in_clip_info_and_timeline() {
2218 let mut srv = server();2343 let mut srv = server();
crates/mcp/src/tools/project.rsmodified+11 -2
@@ -121,7 +121,7 @@ pub fn tools() -> Vec<Tool> {
121 },121 },
122 Tool {122 Tool {
123 name: "project_status",123 name: "project_status",
124- description: "Project path, saved or dirty, canvas size, frame rate, duration, lanes with clip counts, sources, undo and redo steps, running exports, and settings.",124+ description: "Project path, saved or dirty, canvas size, frame rate, duration, lanes with clip counts, sources, undo and redo steps, running exports, the colour looks (built-in and saved, by name, for the look op), and settings.",
125 schema: || schema(json!({}), &[]),125 schema: || schema(json!({}), &[]),
126 run: project_status,126 run: project_status,
127 },127 },
@@ -2176,6 +2176,14 @@ fn status_reply(server: &Server) -> Reply {
2176 };2176 };
2177 let tone = s.tone().name();2177 let tone = s.tone().name();
2178 let encoder = s.encoder_seat().name();2178 let encoder = s.encoder_seat().name();
2179+ // The colour looks the look op takes by name: the built-in ones and the saved ones, A to Z.
2180+ let builtin_looks: Vec<&str> = engine::looks::builtins().iter().map(|(n, _)| *n).collect();
2181+ let saved_looks = engine::looks::saved_names();
2182+ let looks_text = format!(
2183+ "\nlooks: built-in {} · saved {}",
2184+ builtin_looks.join(", "),
2185+ if saved_looks.is_empty() { "none".to_string() } else { saved_looks.join(", ") }
2186+ );
2179 2187
2180 // Each offline source is named on its own line, with the fix; a clip on it is still on the timeline.2188 // Each offline source is named on its own line, with the fix; a clip on it is still on the timeline.
2181 let offline = s.offline_sources();2189 let offline = s.offline_sources();
@@ -2205,7 +2213,7 @@ fn status_reply(server: &Server) -> Reply {
2205 let text = format!(2213 let text = format!(
2206 "{path} · {state} · {w}x{h} @{} · {} ({end}f) · undo {undo} · redo {redo} · {running} export job(s) running\n\2214 "{path} · {state} · {w}x{h} @{} · {} ({end}f) · undo {undo} · redo {redo} · {running} export job(s) running\n\
2207 lanes: {lane_text}{ducks_text}{voice_text}\n\2215 lanes: {lane_text}{ducks_text}{voice_text}\n\
2208- {recent_text}sources: {} {}\n\2216+ {recent_text}sources: {} {}{looks_text}\n\
2209 settings: tonemap {tone} · proxies {} · auto proxies {} · encoder {encoder} · limiter {limiter_text} · sample rate {sample_rate} · still {:.1} s{offline_text}{fix_text}{notes_text}{render_text}",2217 settings: tonemap {tone} · proxies {} · auto proxies {} · encoder {encoder} · limiter {limiter_text} · sample rate {sample_rate} · still {:.1} s{offline_text}{fix_text}{notes_text}{render_text}",
2210 fmt_fps(fps),2218 fmt_fps(fps),
2211 parse::clock(end, fps),2219 parse::clock(end, fps),
@@ -2244,6 +2252,7 @@ fn status_reply(server: &Server) -> Reply {
2244 "redo_steps": redo,2252 "redo_steps": redo,
2245 "recent_steps": recent_steps,2253 "recent_steps": recent_steps,
2246 "jobs_running": running,2254 "jobs_running": running,
2255+ "looks": {"builtin": builtin_looks, "saved": saved_looks},
2247 "unrecovered_autosave": unrecovered,2256 "unrecovered_autosave": unrecovered,
2248 "settings": {2257 "settings": {
2249 "captions": caption_json(s.caption_style()),2258 "captions": caption_json(s.caption_style()),