forge
Explore
Log in

Don't you dare go Hollow

✨ MCP reads back pan, pitch, deinterlace, lane pan, speed-ramp and gain keys, and saved looks

Browse files at this commit

b3755d579f85c61d12f2eec950903d188f7d6b49Ahmet Kaan GümüşParent: b0e72a4
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,
@@ -564,15 +571,16 @@ fn lanes_arg(args: &Value, known: &[Lane]) -> Result<Option<Vec<Lane>>, Reply> {
564 Ok(Some(wanted))571 Ok(Some(wanted))
565 }572 }
566 573
567-fn lane_view(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>) -> LaneView {574+fn lane_view(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>, full: bool) -> LaneView {
568 let rows = match lane.kind {575 let rows = match lane.kind {
569 LaneKind::Subtitle => sub_rows(s, lane, fps, range),576 LaneKind::Subtitle => sub_rows(s, lane, fps, range),
570- _ => media_rows(s, lane, fps, range),577+ _ => media_rows(s, lane, fps, range, full),
571 };578 };
572 LaneView {579 LaneView {
573 lane,580 lane,
574 name: s.lane_name(lane).map(str::to_string),581 name: s.lane_name(lane).map(str::to_string),
575 gain_db: s.lane_gain_db(lane),582 gain_db: s.lane_gain_db(lane),
583+ pan: s.lane_pan(lane),
576 hidden: s.lane_hidden(lane),584 hidden: s.lane_hidden(lane),
577 muted: s.lane_muted(lane),585 muted: s.lane_muted(lane),
578 locked: s.lane_locked(lane),586 locked: s.lane_locked(lane),
@@ -617,7 +625,7 @@ fn duck_json(d: Option<&Duck>) -> Value {
617 })625 })
618 }626 }
619 627
620-fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>) -> Vec<Row> {628+fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32)>, full: bool) -> Vec<Row> {
621 let mut rows = Vec::new();629 let mut rows = Vec::new();
622 // Sources whose file is not on disk: a clip on one is marked, since its picture or sound is missing.630 // Sources whose file is not on disk: a clip on one is marked, since its picture or sound is missing.
623 let offline: Vec<usize> = s.offline_sources().iter().map(|(i, _)| *i).collect();631 let offline: Vec<usize> = s.offline_sources().iter().map(|(i, _)| *i).collect();
@@ -663,6 +671,22 @@ fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32
663 if keys > 0 {671 if keys > 0 {
664 body.push_str(&format!(" keys {keys}"));672 body.push_str(&format!(" keys {keys}"));
665 }673 }
674+ // Pan and pitch belong to audio clips, deinterlace to video clips. Full detail shows them
675+ // always; brief shows only the ones set off their default.
676+ let (pan, pitch, deint) = (
677+ s.clip_pan_of(lane, idx).unwrap_or(0.0),
678+ s.clip_pitch_of(lane, idx).unwrap_or(0),
679+ s.deinterlace_of(lane, idx),
680+ );
681+ if lane.kind == LaneKind::Audio && (full || pan != 0.0) {
682+ body.push_str(&format!(" pan {}", num(f64::from(pan))));
683+ }
684+ if lane.kind == LaneKind::Audio && (full || pitch != 0) {
685+ body.push_str(&format!(" pitch {pitch:+}"));
686+ }
687+ if lane.kind == LaneKind::Video && (full || deint != engine::project::Deinterlace::Frame) {
688+ body.push_str(&format!(" deinterlace {}", deint.name()));
689+ }
666 let (okeys, ckeys) = (s.opacity_keys_of(lane, idx).len(), s.color_keys_of(lane, idx).len());690 let (okeys, ckeys) = (s.opacity_keys_of(lane, idx).len(), s.color_keys_of(lane, idx).len());
667 if okeys > 0 {691 if okeys > 0 {
668 body.push_str(&format!(" opacity keys {okeys}"));692 body.push_str(&format!(" opacity keys {okeys}"));
@@ -706,6 +730,9 @@ fn media_rows(s: &PlaybackSession, lane: Lane, fps: f64, range: Option<(u32, u32
706 "opacity_keys": okeys,730 "opacity_keys": okeys,
707 "color_keys": ckeys,731 "color_keys": ckeys,
708 "env": !c.gain_keys.is_empty(),732 "env": !c.gain_keys.is_empty(),
733+ "pan": pan,
734+ "pitch": pitch,
735+ "deinterlace": deint.name(),
709 "visualizer": c.visualizer != 0,736 "visualizer": c.visualizer != 0,
710 });737 });
711 rows.push(Row {738 rows.push(Row {
@@ -832,6 +859,7 @@ impl LaneView {
832 lane,859 lane,
833 name: None,860 name: None,
834 gain_db: 0.0,861 gain_db: 0.0,
862+ pan: 0.0,
835 hidden: false,863 hidden: false,
836 muted: false,864 muted: false,
837 locked: false,865 locked: false,
@@ -1002,6 +1030,41 @@ fn effect_keys_json(c: &Clip, fps: f64, effects: &[Effect]) -> Value {
1002 )1030 )
1003 }1031 }
1004 1032
1033+/// A speed ramp's keys, one line each: the clip-relative time they sit at, which is the time the
1034+/// speed_ramp op's `at` takes, and the speed there.
1035+fn speed_key_lines(fps: f64, keys: &[engine::project::SpeedKey]) -> Vec<String> {
1036+ keys.iter()
1037+ .map(|k| format!(" at clip {:.3}s speed {}x", f64::from(k.at) / fps, num(k.speed.as_f64())))
1038+ .collect()
1039+}
1040+
1041+/// The speed ramp as JSON, every key: its clip-relative time in seconds and its speed.
1042+fn speed_keys_json(fps: f64, keys: &[engine::project::SpeedKey]) -> Value {
1043+ Value::Array(
1044+ keys.iter()
1045+ .map(|k| json!({"clip_time": f64::from(k.at) / fps, "speed": k.speed.as_f64()}))
1046+ .collect(),
1047+ )
1048+}
1049+
1050+/// The volume envelope as JSON, every point (the text cuts it short): its timeline time, its
1051+/// source frame, its dB and the ease that leaves it.
1052+fn gain_keys_json(c: &Clip, fps: f64) -> Value {
1053+ Value::Array(
1054+ c.gain_keys
1055+ .iter()
1056+ .map(|k| {
1057+ json!({
1058+ "time": timeline_of(c, k.at) / fps,
1059+ "source_frame": k.at,
1060+ "db": k.db,
1061+ "ease": k.ease.name(),
1062+ })
1063+ })
1064+ .collect(),
1065+ )
1066+}
1067+
1005 fn opacity_keys_json(c: &Clip, fps: f64, keys: &[OpacityKey]) -> Value {1068 fn opacity_keys_json(c: &Clip, fps: f64, keys: &[OpacityKey]) -> Value {
1006 Value::Array(1069 Value::Array(
1007 keys.iter()1070 keys.iter()
@@ -1322,6 +1385,30 @@ fn media_info(s: &PlaybackSession, lane: Lane, idx: usize, fps: f64) -> Reply {
1322 if c.gain_db != 0.0 {1385 if c.gain_db != 0.0 {
1323 lines.push(format!("gain {}dB", num(f64::from(c.gain_db))));1386 lines.push(format!("gain {}dB", num(f64::from(c.gain_db))));
1324 }1387 }
1388+ // Pan, pitch and deinterlace, each shown only when it is off its default.
1389+ let (pan, pitch, deint) = (
1390+ s.clip_pan_of(lane, idx).unwrap_or(0.0),
1391+ s.clip_pitch_of(lane, idx).unwrap_or(0),
1392+ s.deinterlace_of(lane, idx),
1393+ );
1394+ let mut tweaks = Vec::new();
1395+ if pan != 0.0 {
1396+ tweaks.push(format!("pan {}", num(f64::from(pan))));
1397+ }
1398+ if pitch != 0 {
1399+ tweaks.push(format!("pitch {pitch:+} semitones"));
1400+ }
1401+ if deint != engine::project::Deinterlace::Frame {
1402+ tweaks.push(format!("deinterlace {}", deint.name()));
1403+ }
1404+ if !tweaks.is_empty() {
1405+ lines.push(tweaks.join(" · "));
1406+ }
1407+ // Every key of a speed ramp, so the ramp can be read and edited key by key.
1408+ if !c.speed_keys.is_empty() {
1409+ lines.push(format!("speed keys: {}", c.speed_keys.len()));
1410+ lines.extend(speed_key_lines(fps, &c.speed_keys));
1411+ }
1325 // The volume envelope, in timeline times; only an audio clip can have one.1412 // The volume envelope, in timeline times; only an audio clip can have one.
1326 if !c.gain_keys.is_empty() {1413 if !c.gain_keys.is_empty() {
1327 lines.push(format!(1414 lines.push(format!(
@@ -1397,6 +1484,12 @@ fn media_info(s: &PlaybackSession, lane: Lane, idx: usize, fps: f64) -> Reply {
1397 "duck": duck_json(ducks.first()),1484 "duck": duck_json(ducks.first()),
1398 "ducks": ducks_json(&ducks),1485 "ducks": ducks_json(&ducks),
1399 "voice": voice_json_of(&voice),1486 "voice": voice_json_of(&voice),
1487+ "pan": pan,
1488+ "pitch": pitch,
1489+ "deinterlace": deint.name(),
1490+ "speed_keys": speed_keys_json(fps, &c.speed_keys),
1491+ "gain_db": c.gain_db,
1492+ "gain_keys": gain_keys_json(c, fps),
1400 });1493 });
1401 Reply::ok(lines.join("\n")).with(structured)1494 Reply::ok(lines.join("\n")).with(structured)
1402 }1495 }
@@ -2211,6 +2304,38 @@ mod tests {
2211 assert!(tl.text.contains("speed ramp 1.00x→2.00x (3 keys)"), "{}", tl.text);2304 assert!(tl.text.contains("speed ramp 1.00x→2.00x (3 keys)"), "{}", tl.text);
2212 }2305 }
2213 2306
2307+ #[test]
2308+ fn clip_info_reads_back_pan_pitch_deinterlace_and_every_ramp_key() {
2309+ let mut srv = server();
2310+ let r = crate::tools::edit::run_edit(
2311+ &mut srv,
2312+ &json!({"ops": [
2313+ {"op": "pan", "clip": "A1#0", "pan": -0.5},
2314+ {"op": "pitch", "clip": "A1#0", "semitones": 3},
2315+ {"op": "deinterlace", "clip": "V1#0", "mode": "field"},
2316+ {"op": "speed_ramp", "clip": "V1#0", "keys": [
2317+ {"at": "0s", "speed": 1.0}, {"at": "1s", "speed": 1.5}, {"at": "2s", "speed": 2.0}
2318+ ]}
2319+ ]}),
2320+ );
2321+ assert!(!r.is_error, "{}", r.text);
2322+ let audio = call(&mut srv, "clip_info", json!({"clip": "A1#0"}));
2323+ assert!(audio.text.contains("pan -0.5 · pitch +3 semitones"), "{}", audio.text);
2324+ assert_eq!(audio.structured.as_ref().unwrap()["pan"], -0.5);
2325+ assert_eq!(audio.structured.as_ref().unwrap()["pitch"], 3);
2326+ let video = call(&mut srv, "clip_info", json!({"clip": "V1#0"}));
2327+ assert!(video.text.contains("deinterlace field"), "{}", video.text);
2328+ 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);
2329+ let v = video.structured.as_ref().unwrap();
2330+ assert_eq!(v["deinterlace"], "field");
2331+ assert_eq!(v["speed_keys"].as_array().unwrap().len(), 3);
2332+ assert_eq!(v["speed_keys"][1]["clip_time"], 1.0);
2333+ // Brief timeline rows name a pitch that is set, and leave out a deinterlace at its default.
2334+ let tl = call(&mut srv, "timeline", json!({}));
2335+ assert!(tl.text.contains("pitch +3"), "{}", tl.text);
2336+ assert!(!tl.text.contains("deinterlace frame"), "{}", tl.text);
2337+ }
2338+
2214 #[test]2339 #[test]
2215 fn reverse_toggles_with_on_and_shows_in_clip_info_and_timeline() {2340 fn reverse_toggles_with_on_and_shows_in_clip_info_and_timeline() {
2216 let mut srv = server();2341 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()),