davinci-resolve-mcp 2.150.0 → 2.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +1 -1
- package/README.zh-CN.md +2 -2
- package/install.py +1 -1
- package/package.json +1 -1
- package/resolve-advanced/server/author-interchange.mjs +19 -1
- package/resolve-advanced/server/editorial.mjs +57 -2
- package/resolve-advanced/server/tools/drt.mjs +1 -1
- package/src/granular/common.py +1 -1
- package/src/server.py +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
|
|
4
4
|
|
|
5
|
+
## What's New in v2.151.0 — fade parity: OTIO and XMEML fades author too
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **OTIO and XMEML fades route through the black machinery** shipped for EDL
|
|
10
|
+
BL legs in v2.150.0. OTIO: a Transition adjacent to a Gap (or the track
|
|
11
|
+
edge) is a fade — gap-then-Transition-then-Clip fades in, Transition-then-
|
|
12
|
+
Gap (or Transition as the last child) fades out. XMEML: an edge
|
|
13
|
+
transitionitem whose span has no outgoing clip fades in, no incoming clip
|
|
14
|
+
fades out. All synthesize BL pseudo-events; the bridge materializes a
|
|
15
|
+
zero-length black leg to cover its side of the span whenever the boundary
|
|
16
|
+
shift alone won't grow it (empty track renders black, so the growth is
|
|
17
|
+
render-neutral). Live OTIO render: fade-in luma ramps 18→123, the centered
|
|
18
|
+
fade-out 124→18 — identical geometry from all three parsers.
|
|
19
|
+
|
|
5
20
|
## What's New in v2.150.0 — fades conform: BL legs author, and Resolve's own EDL importer drops them
|
|
6
21
|
|
|
7
22
|
### Added
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [简体中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#server-modes)
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
[](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
|
|
6
6
|
[](https://www.npmjs.com/package/davinci-resolve-mcp)
|
|
7
7
|
[](docs/reference/api-coverage.md)
|
|
8
8
|
[-blue.svg)](#服务器模式)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[](https://www.python.org/downloads/)
|
|
13
13
|
[](https://opensource.org/licenses/MIT)
|
|
14
14
|
|
|
15
|
-
> 本翻译对应 v2.
|
|
15
|
+
> 本翻译对应 v2.151.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
|
|
16
16
|
|
|
17
17
|
一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
|
|
18
18
|
|
package/install.py
CHANGED
|
@@ -37,7 +37,7 @@ from src.utils.update_check import (
|
|
|
37
37
|
|
|
38
38
|
# ─── Version ──────────────────────────────────────────────────────────────────
|
|
39
39
|
|
|
40
|
-
VERSION = "2.
|
|
40
|
+
VERSION = "2.151.0"
|
|
41
41
|
# Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
|
|
42
42
|
# Resolve's scripting bridge loads into newer interpreters on recent builds
|
|
43
43
|
# (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
|
package/package.json
CHANGED
|
@@ -313,9 +313,14 @@ export function eventsToAssembleSpec(events, opts = {}) {
|
|
|
313
313
|
d += d % 2;
|
|
314
314
|
let pre = Math.floor(d / 2);
|
|
315
315
|
if (e.transition.alignment === 'start') pre = 0;
|
|
316
|
+
else if (e.transition.inOffset != null) pre = Math.min(d, Math.max(0, toTl(e.transition.inOffset, e.fps)));
|
|
317
|
+
else if (e.transition.recStart != null) {
|
|
318
|
+
const spanStartAbs = ORIGIN + (toTl(e.transition.recStart, e.fps) - minRec);
|
|
319
|
+
pre = Math.min(d, Math.max(0, recIn - spanStartAbs));
|
|
320
|
+
}
|
|
316
321
|
transitionCandidates.push({
|
|
317
322
|
atFrame: recIn, durationFrames: d, track: vTrackEarly, pre,
|
|
318
|
-
explicitSpan: e.transition.alignment != null,
|
|
323
|
+
explicitSpan: e.transition.alignment != null || e.transition.inOffset != null || e.transition.recStart != null,
|
|
319
324
|
index: e.index, type: e.transition.type, rawDuration: e.transition.duration,
|
|
320
325
|
source: e.source, srcIn: Infinity, incomingCutRef: el, cutPoint: e.transition.cutPoint,
|
|
321
326
|
});
|
|
@@ -508,6 +513,19 @@ export function eventsToAssembleSpec(events, opts = {}) {
|
|
|
508
513
|
// FULL-duration outgoing tail.
|
|
509
514
|
const pre = c.pre ?? c.durationFrames / 2;
|
|
510
515
|
const post = c.durationFrames - pre;
|
|
516
|
+
// OTIO/XMEML fades (E92): a zero-length BL leg MATERIALIZES to cover its
|
|
517
|
+
// side of the span whenever the boundary shift alone won't grow it —
|
|
518
|
+
// empty track renders black, so growth beyond the picture is
|
|
519
|
+
// render-neutral, and placeTransition needs a physical item on each side
|
|
520
|
+
// of the junction. (The CMX pre===0 form grows through the shift below.)
|
|
521
|
+
if (isBL(prev.source) && prev.cutRef.durationFrames === 0 && pre > 0) {
|
|
522
|
+
prev.cutRef.startFrame -= pre;
|
|
523
|
+
prev.cutRef.durationFrames += pre;
|
|
524
|
+
prev.start -= pre;
|
|
525
|
+
}
|
|
526
|
+
if (isBL(c.source) && c.incomingCutRef.durationFrames === 0 && post > 0) {
|
|
527
|
+
c.incomingCutRef.durationFrames += post;
|
|
528
|
+
}
|
|
511
529
|
// A BL side has infinite handles: a Solid Color generator extends freely
|
|
512
530
|
// in both directions (srcIn is already Infinity on BL candidates).
|
|
513
531
|
const bHandle = c.srcIn >= pre;
|
|
@@ -162,13 +162,31 @@ export function parseOTIO(otio, opts = {}) {
|
|
|
162
162
|
// field so the bridge can author it (type strings like SMPTE_Dissolve
|
|
163
163
|
// map through the same style table as XMEML effectids).
|
|
164
164
|
let pendingTransition = null;
|
|
165
|
+
// Track start counts as black: a Transition with a Gap (or nothing) on
|
|
166
|
+
// one side is a FADE. It routes through the same BL machinery as EDL BL
|
|
167
|
+
// dissolves (E91/E92): a synthetic zero-length BL event materializes the
|
|
168
|
+
// black side, and the bridge authors a real clip↔generator dissolve —
|
|
169
|
+
// empty track renders black anyway, so the growth is render-neutral.
|
|
170
|
+
let atBlack = true;
|
|
171
|
+
const lastRate = () => opts.fps || 24;
|
|
165
172
|
for (const child of track.children || []) {
|
|
166
173
|
const schema = child.OTIO_SCHEMA || '';
|
|
167
174
|
const dur = (child.source_range && child.source_range.duration && child.source_range.duration.value) || 0;
|
|
168
175
|
const rate = (child.source_range && child.source_range.duration && child.source_range.duration.rate) || opts.fps || 24;
|
|
169
176
|
if (schema.startsWith('Gap')) {
|
|
177
|
+
if (pendingTransition) {
|
|
178
|
+
// Transition then Gap = fade-out into black: attach it to a
|
|
179
|
+
// synthetic BL leg at the junction (the bridge grows it forward).
|
|
180
|
+
events.push(evt({
|
|
181
|
+
index: idx++, track: kind, source: 'BL',
|
|
182
|
+
recIn: rec, recOut: rec, transition: pendingTransition, fps: lastRate(),
|
|
183
|
+
}));
|
|
184
|
+
pendingTransition = null;
|
|
185
|
+
} else {
|
|
186
|
+
pendingTransition = null; // a mid-timeline gap breaks a junction
|
|
187
|
+
}
|
|
170
188
|
rec += dur;
|
|
171
|
-
|
|
189
|
+
atBlack = true;
|
|
172
190
|
continue;
|
|
173
191
|
}
|
|
174
192
|
if (schema.startsWith('Transition')) {
|
|
@@ -180,6 +198,15 @@ export function parseOTIO(otio, opts = {}) {
|
|
|
180
198
|
continue;
|
|
181
199
|
}
|
|
182
200
|
if (schema.startsWith('Clip')) {
|
|
201
|
+
if (pendingTransition && atBlack) {
|
|
202
|
+
// Gap (or track start) then Transition then Clip = fade-IN from
|
|
203
|
+
// black — the CMX zero-length-BL form, grown by the bridge.
|
|
204
|
+
events.push(evt({
|
|
205
|
+
index: idx++, track: kind, source: 'BL',
|
|
206
|
+
recIn: rec, recOut: rec, fps: rate,
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
atBlack = false;
|
|
183
210
|
const startVal = (child.source_range && child.source_range.start_time && child.source_range.start_time.value) || 0;
|
|
184
211
|
// Retime via a LinearTimeWarp effect (time_scalar).
|
|
185
212
|
let speed = 100,
|
|
@@ -220,6 +247,13 @@ export function parseOTIO(otio, opts = {}) {
|
|
|
220
247
|
rec += dur;
|
|
221
248
|
}
|
|
222
249
|
}
|
|
250
|
+
if (pendingTransition) {
|
|
251
|
+
// Transition as the LAST child = fade-out to the end of the track.
|
|
252
|
+
events.push(evt({
|
|
253
|
+
index: idx++, track: kind, source: 'BL',
|
|
254
|
+
recIn: rec, recOut: rec, transition: pendingTransition, fps: lastRate(),
|
|
255
|
+
}));
|
|
256
|
+
}
|
|
223
257
|
}
|
|
224
258
|
return events;
|
|
225
259
|
}
|
|
@@ -289,7 +323,28 @@ export function parseXMEMLEvents(xml, opts = {}) {
|
|
|
289
323
|
// recStart carries the transitionitem's EXPLICIT record span start
|
|
290
324
|
// (sequence-relative) so the bridge reproduces the editor's actual
|
|
291
325
|
// alignment instead of assuming centered.
|
|
292
|
-
if (incoming)
|
|
326
|
+
if (incoming) {
|
|
327
|
+
incoming.transition = { type: String(effectId), duration: e2 - s, recStart: s };
|
|
328
|
+
// No clip ENDS inside the span → nothing precedes: a fade-IN from
|
|
329
|
+
// black. Synthesize the zero-length BL leg (E91/E92) so the bridge
|
|
330
|
+
// authors a real black-to-picture dissolve instead of dropping it.
|
|
331
|
+
const outgoing = events.slice(before).find((ev) => ev.track === label && ev !== incoming && ev.recOut > s - 1 && ev.recOut <= e2);
|
|
332
|
+
if (!outgoing) {
|
|
333
|
+
events.push(evt({ index: idx++, track: label, source: 'BL', recIn: incoming.recIn, recOut: incoming.recIn, fps: seqRate }));
|
|
334
|
+
}
|
|
335
|
+
} else {
|
|
336
|
+
// No clip STARTS inside the span: a fade-OUT into black past the
|
|
337
|
+
// last clip. Attach the transition to a synthetic BL leg at the
|
|
338
|
+
// outgoing clip's end (the bridge grows it forward).
|
|
339
|
+
const outgoing = events.slice(before).find((ev) => ev.track === label && ev.recOut > s - 1 && ev.recOut <= e2);
|
|
340
|
+
if (outgoing) {
|
|
341
|
+
events.push(evt({
|
|
342
|
+
index: idx++, track: label, source: 'BL',
|
|
343
|
+
recIn: outgoing.recOut, recOut: outgoing.recOut,
|
|
344
|
+
transition: { type: String(effectId), duration: e2 - s, recStart: s }, fps: seqRate,
|
|
345
|
+
}));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
293
348
|
}
|
|
294
349
|
});
|
|
295
350
|
const atracks = media.audio && media.audio.track ? (Array.isArray(media.audio.track) ? media.audio.track : [media.audio.track]) : [];
|
|
@@ -153,7 +153,7 @@ function requirePathArg(args, key, action) {
|
|
|
153
153
|
export const drtTool = {
|
|
154
154
|
name: 'drt',
|
|
155
155
|
description:
|
|
156
|
-
'DaVinci Resolve Timeline (.drt) operations — offline, no Resolve required. Actions: assemble_from_interchange (EDL/OTIO/XML/AAF + sourceMap → IMPORTABLE RENDERING native .drt in one call; retimes AUTHOR — constant speed fwd/rev AND zero-speed freezes (EDL M2 000.0; render-proven frozen); cross-dissolves are AUTHORED when the cut abuts with handles both sides (render-verified on 19), else dropped with reason; EDL BL
|
|
156
|
+
'DaVinci Resolve Timeline (.drt) operations — offline, no Resolve required. Actions: assemble_from_interchange (EDL/OTIO/XML/AAF + sourceMap → IMPORTABLE RENDERING native .drt in one call; retimes AUTHOR — constant speed fwd/rev AND zero-speed freezes (EDL M2 000.0; render-proven frozen); cross-dissolves are AUTHORED when the cut abuts with handles both sides (render-verified on 19), else dropped with reason; fades AUTHOR across formats (EDL BL legs, OTIO gap-adjacent Transitions, XMEML edge transitionitems) — BL legs become Solid Color generators and the fade a real clip-to-generator dissolve, luma-ramp render-verified, while Resolve\'s OWN EDL importer drops BL dissolves silently; ledger in `conform`), assemble (spec → IMPORTABLE native-schema .drt via template-spliced real structures; pass targetAppVersion e.g. \'19.1\' for pre-21 hosts), parse, list_sequences (enumerate the timelines inside a .drp/.drt → [{id,name,eventCount,index}] to drive a "which sequence?" picker), author, validate, inject_into_drp, extract_from_drp (pull one SeqContainer out as a .drt — feed the .drt to the Python davinci-resolve MCP timeline.import_timeline_checked, or use timeline.import_from_drp to do both), downgrade (stamp <ProjectVersion> down so an OLDER Resolve will import a .drt/.drp from a newer one — pass targetAppVersion like "19.1.3" or targetProjectVersion).',
|
|
157
157
|
async handler({ action, args }) {
|
|
158
158
|
if (action === 'parse') {
|
|
159
159
|
const p = parseSchema.parse(requirePathArg(args, 'drtPath', 'parse'));
|
package/src/granular/common.py
CHANGED
|
@@ -87,7 +87,7 @@ if not logging.getLogger().handlers:
|
|
|
87
87
|
handlers=[logging.StreamHandler()],
|
|
88
88
|
)
|
|
89
89
|
|
|
90
|
-
VERSION = "2.
|
|
90
|
+
VERSION = "2.151.0"
|
|
91
91
|
logger = logging.getLogger("davinci-resolve-mcp")
|
|
92
92
|
logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
|
|
93
93
|
logger.info(f"Detected platform: {get_platform()}")
|