@synthetic-ai/premiere-mcp 2.0.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 +73 -0
- package/LICENSE +21 -0
- package/README.md +242 -0
- package/cep-plugin/.debug +8 -0
- package/cep-plugin/CSInterface.js +70 -0
- package/cep-plugin/CSXS/manifest.xml +49 -0
- package/cep-plugin/host.jsx +7 -0
- package/cep-plugin/index.html +419 -0
- package/cep-plugin/main.js +327 -0
- package/cep-plugin/premiere.jsx +24947 -0
- package/cep-plugin/synthetic-logo.png +0 -0
- package/dist/bridge/file-bridge.d.ts +29 -0
- package/dist/bridge/file-bridge.js +145 -0
- package/dist/bridge/script-builder.d.ts +19 -0
- package/dist/bridge/script-builder.js +408 -0
- package/dist/http-server.d.ts +21 -0
- package/dist/http-server.js +140 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +70 -0
- package/dist/resources/extendscript-reference.d.ts +2 -0
- package/dist/resources/extendscript-reference.js +219 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +276 -0
- package/dist/tools/advanced.d.ts +530 -0
- package/dist/tools/advanced.js +923 -0
- package/dist/tools/audio-advanced.d.ts +847 -0
- package/dist/tools/audio-advanced.js +1653 -0
- package/dist/tools/audio.d.ts +84 -0
- package/dist/tools/audio.js +123 -0
- package/dist/tools/captions.d.ts +30 -0
- package/dist/tools/captions.js +73 -0
- package/dist/tools/clipboard.d.ts +153 -0
- package/dist/tools/clipboard.js +381 -0
- package/dist/tools/color-advanced.d.ts +821 -0
- package/dist/tools/color-advanced.js +772 -0
- package/dist/tools/discovery.d.ts +128 -0
- package/dist/tools/discovery.js +445 -0
- package/dist/tools/effects.d.ts +211 -0
- package/dist/tools/effects.js +554 -0
- package/dist/tools/export-presets.d.ts +333 -0
- package/dist/tools/export-presets.js +490 -0
- package/dist/tools/export.d.ts +320 -0
- package/dist/tools/export.js +618 -0
- package/dist/tools/health.d.ts +9 -0
- package/dist/tools/health.js +25 -0
- package/dist/tools/inspection.d.ts +179 -0
- package/dist/tools/inspection.js +1089 -0
- package/dist/tools/keyframes.d.ts +253 -0
- package/dist/tools/keyframes.js +611 -0
- package/dist/tools/markers.d.ts +117 -0
- package/dist/tools/markers.js +206 -0
- package/dist/tools/media.d.ts +297 -0
- package/dist/tools/media.js +493 -0
- package/dist/tools/metadata.d.ts +178 -0
- package/dist/tools/metadata.js +278 -0
- package/dist/tools/multicam.d.ts +199 -0
- package/dist/tools/multicam.js +212 -0
- package/dist/tools/playback.d.ts +34 -0
- package/dist/tools/playback.js +63 -0
- package/dist/tools/playhead.d.ts +77 -0
- package/dist/tools/playhead.js +185 -0
- package/dist/tools/project-manager.d.ts +65 -0
- package/dist/tools/project-manager.js +81 -0
- package/dist/tools/project.d.ts +390 -0
- package/dist/tools/project.js +596 -0
- package/dist/tools/scripting.d.ts +98 -0
- package/dist/tools/scripting.js +434 -0
- package/dist/tools/selection.d.ts +120 -0
- package/dist/tools/selection.js +334 -0
- package/dist/tools/sequence-advanced.d.ts +84 -0
- package/dist/tools/sequence-advanced.js +471 -0
- package/dist/tools/sequence-settings.d.ts +397 -0
- package/dist/tools/sequence-settings.js +967 -0
- package/dist/tools/sequence.d.ts +211 -0
- package/dist/tools/sequence.js +378 -0
- package/dist/tools/source-monitor.d.ts +95 -0
- package/dist/tools/source-monitor.js +180 -0
- package/dist/tools/text.d.ts +97 -0
- package/dist/tools/text.js +159 -0
- package/dist/tools/timeline.d.ts +265 -0
- package/dist/tools/timeline.js +575 -0
- package/dist/tools/track-management.d.ts +482 -0
- package/dist/tools/track-management.js +787 -0
- package/dist/tools/track-targeting.d.ts +666 -0
- package/dist/tools/track-targeting.js +1318 -0
- package/dist/tools/tracks.d.ts +90 -0
- package/dist/tools/tracks.js +183 -0
- package/dist/tools/transitions-motion.d.ts +788 -0
- package/dist/tools/transitions-motion.js +680 -0
- package/dist/tools/transitions.d.ts +124 -0
- package/dist/tools/transitions.js +267 -0
- package/dist/tools/utility.d.ts +469 -0
- package/dist/tools/utility.js +1118 -0
- package/dist/tools/workspace.d.ts +25 -0
- package/dist/tools/workspace.js +61 -0
- package/package.json +66 -0
- package/scripts/build-chat-dmg.sh +210 -0
- package/scripts/build-chat-zip.sh +291 -0
- package/scripts/install-cep-windows.ps1 +99 -0
- package/scripts/install-cep.sh +66 -0
- package/scripts/install-chat-plugin.bat +67 -0
- package/scripts/install-chat-plugin.sh +85 -0
- package/scripts/install-windows.bat +95 -0
- package/scripts/package.mjs +218 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
|
|
2
|
+
import { sendCommand } from "../bridge/file-bridge.js";
|
|
3
|
+
export function getSourceMonitorTools(bridgeOptions) {
|
|
4
|
+
return {
|
|
5
|
+
open_in_source: {
|
|
6
|
+
description: "Open a project item in the Source Monitor for preview and trimming.",
|
|
7
|
+
parameters: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
item_id: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "Node ID or name of the project item to open",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
required: ["item_id"],
|
|
16
|
+
},
|
|
17
|
+
handler: async (args) => {
|
|
18
|
+
const script = buildToolScript(`
|
|
19
|
+
var item = __findProjectItem("${escapeForExtendScript(args.item_id)}");
|
|
20
|
+
if (!item) return __error("Project item not found");
|
|
21
|
+
app.sourceMonitor.openProjectItem(item);
|
|
22
|
+
return __result({ opened: true, item: item.name });
|
|
23
|
+
`);
|
|
24
|
+
return sendCommand(script, bridgeOptions);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
close_source_monitor: {
|
|
28
|
+
description: "Close the clip currently open in the Source Monitor.",
|
|
29
|
+
parameters: {},
|
|
30
|
+
handler: async () => {
|
|
31
|
+
const script = buildToolScript(`
|
|
32
|
+
app.sourceMonitor.closeClip();
|
|
33
|
+
return __result({ closed: true });
|
|
34
|
+
`);
|
|
35
|
+
return sendCommand(script, bridgeOptions);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
close_all_source_clips: {
|
|
39
|
+
description: "Close all clips in the Source Monitor.",
|
|
40
|
+
parameters: {},
|
|
41
|
+
handler: async () => {
|
|
42
|
+
const script = buildToolScript(`
|
|
43
|
+
app.sourceMonitor.closeAllClips();
|
|
44
|
+
return __result({ closed: true });
|
|
45
|
+
`);
|
|
46
|
+
return sendCommand(script, bridgeOptions);
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
set_source_in_out: {
|
|
50
|
+
description: "Set in and/or out points on the clip currently open in the Source Monitor.",
|
|
51
|
+
parameters: {
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
in_seconds: {
|
|
55
|
+
type: "number",
|
|
56
|
+
description: "In point in seconds (optional)",
|
|
57
|
+
},
|
|
58
|
+
out_seconds: {
|
|
59
|
+
type: "number",
|
|
60
|
+
description: "Out point in seconds (optional)",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
handler: async (args) => {
|
|
65
|
+
const script = buildToolScript(`
|
|
66
|
+
var item = app.sourceMonitor.getProjectItem();
|
|
67
|
+
if (!item) return __error("No clip open in Source Monitor");
|
|
68
|
+
|
|
69
|
+
${args.in_seconds !== undefined ? `
|
|
70
|
+
var inTime = new Time();
|
|
71
|
+
inTime.seconds = ${args.in_seconds};
|
|
72
|
+
item.setInPoint(inTime.ticks, 4);
|
|
73
|
+
` : ""}
|
|
74
|
+
|
|
75
|
+
${args.out_seconds !== undefined ? `
|
|
76
|
+
var outTime = new Time();
|
|
77
|
+
outTime.seconds = ${args.out_seconds};
|
|
78
|
+
item.setOutPoint(outTime.ticks, 4);
|
|
79
|
+
` : ""}
|
|
80
|
+
|
|
81
|
+
return __result({
|
|
82
|
+
item: item.name,
|
|
83
|
+
inSet: ${args.in_seconds !== undefined},
|
|
84
|
+
outSet: ${args.out_seconds !== undefined}
|
|
85
|
+
});
|
|
86
|
+
`);
|
|
87
|
+
return sendCommand(script, bridgeOptions);
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
insert_from_source: {
|
|
91
|
+
description: "Insert the clip from the Source Monitor at the playhead position (insert edit — shifts existing clips).",
|
|
92
|
+
parameters: {
|
|
93
|
+
type: "object",
|
|
94
|
+
properties: {
|
|
95
|
+
video_track_index: {
|
|
96
|
+
type: "number",
|
|
97
|
+
description: "Target video track index (default: 0)",
|
|
98
|
+
},
|
|
99
|
+
audio_track_index: {
|
|
100
|
+
type: "number",
|
|
101
|
+
description: "Target audio track index (default: 0)",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
handler: async (args) => {
|
|
106
|
+
const vTrack = args.video_track_index ?? 0;
|
|
107
|
+
const aTrack = args.audio_track_index ?? 0;
|
|
108
|
+
const script = buildToolScript(`
|
|
109
|
+
var seq = app.project.activeSequence;
|
|
110
|
+
if (!seq) return __error("No active sequence");
|
|
111
|
+
|
|
112
|
+
var item = app.sourceMonitor.getProjectItem();
|
|
113
|
+
if (!item) return __error("No clip open in Source Monitor");
|
|
114
|
+
|
|
115
|
+
var pos = seq.getPlayerPosition().ticks;
|
|
116
|
+
seq.insertClip(item, pos, ${vTrack}, ${aTrack});
|
|
117
|
+
|
|
118
|
+
return __result({ inserted: true, item: item.name, atSeconds: __ticksToSeconds(pos) });
|
|
119
|
+
`);
|
|
120
|
+
return sendCommand(script, bridgeOptions);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
overwrite_from_source: {
|
|
124
|
+
description: "Overwrite the clip from the Source Monitor at the playhead position (overwrite edit — replaces existing clips).",
|
|
125
|
+
parameters: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
video_track_index: {
|
|
129
|
+
type: "number",
|
|
130
|
+
description: "Target video track index (default: 0)",
|
|
131
|
+
},
|
|
132
|
+
audio_track_index: {
|
|
133
|
+
type: "number",
|
|
134
|
+
description: "Target audio track index (default: 0)",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
handler: async (args) => {
|
|
139
|
+
const vTrack = args.video_track_index ?? 0;
|
|
140
|
+
const aTrack = args.audio_track_index ?? 0;
|
|
141
|
+
const script = buildToolScript(`
|
|
142
|
+
var seq = app.project.activeSequence;
|
|
143
|
+
if (!seq) return __error("No active sequence");
|
|
144
|
+
|
|
145
|
+
var item = app.sourceMonitor.getProjectItem();
|
|
146
|
+
if (!item) return __error("No clip open in Source Monitor");
|
|
147
|
+
|
|
148
|
+
var pos = seq.getPlayerPosition().ticks;
|
|
149
|
+
seq.overwriteClip(item, pos, ${vTrack}, ${aTrack});
|
|
150
|
+
|
|
151
|
+
return __result({ overwritten: true, item: item.name, atSeconds: __ticksToSeconds(pos) });
|
|
152
|
+
`);
|
|
153
|
+
return sendCommand(script, bridgeOptions);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
get_source_monitor_info: {
|
|
157
|
+
description: "Get information about the clip currently loaded in the Source Monitor.",
|
|
158
|
+
parameters: {},
|
|
159
|
+
handler: async () => {
|
|
160
|
+
const script = buildToolScript(`
|
|
161
|
+
var item = app.sourceMonitor.getProjectItem();
|
|
162
|
+
if (!item) return __result({ loaded: false });
|
|
163
|
+
|
|
164
|
+
var info = {
|
|
165
|
+
loaded: true,
|
|
166
|
+
nodeId: item.nodeId,
|
|
167
|
+
name: item.name
|
|
168
|
+
};
|
|
169
|
+
try { info.mediaPath = item.getMediaPath(); } catch(e) {}
|
|
170
|
+
try { info.inPoint = __ticksToSeconds(item.getInPoint().ticks); } catch(e) {}
|
|
171
|
+
try { info.outPoint = __ticksToSeconds(item.getOutPoint().ticks); } catch(e) {}
|
|
172
|
+
|
|
173
|
+
return __result(info);
|
|
174
|
+
`);
|
|
175
|
+
return sendCommand(script, bridgeOptions);
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=source-monitor.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { BridgeOptions } from "../bridge/file-bridge.js";
|
|
2
|
+
export declare function getTextTools(bridgeOptions: BridgeOptions): {
|
|
3
|
+
add_text_overlay: {
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
text: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
track_index: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
start_seconds: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
duration_seconds: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
font_size: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
required: string[];
|
|
30
|
+
};
|
|
31
|
+
handler: (args: {
|
|
32
|
+
text: string;
|
|
33
|
+
track_index?: number;
|
|
34
|
+
start_seconds?: number;
|
|
35
|
+
duration_seconds?: number;
|
|
36
|
+
font_size?: number;
|
|
37
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
38
|
+
};
|
|
39
|
+
import_mogrt: {
|
|
40
|
+
description: string;
|
|
41
|
+
parameters: {
|
|
42
|
+
type: "object";
|
|
43
|
+
properties: {
|
|
44
|
+
mogrt_path: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
track_index: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
start_seconds: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
duration_seconds: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
required: string[];
|
|
62
|
+
};
|
|
63
|
+
handler: (args: {
|
|
64
|
+
mogrt_path: string;
|
|
65
|
+
track_index?: number;
|
|
66
|
+
start_seconds?: number;
|
|
67
|
+
duration_seconds?: number;
|
|
68
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
69
|
+
};
|
|
70
|
+
import_mogrt_from_library: {
|
|
71
|
+
description: string;
|
|
72
|
+
parameters: {
|
|
73
|
+
type: "object";
|
|
74
|
+
properties: {
|
|
75
|
+
mogrt_name: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
track_index: {
|
|
80
|
+
type: string;
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
start_seconds: {
|
|
84
|
+
type: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
required: string[];
|
|
89
|
+
};
|
|
90
|
+
handler: (args: {
|
|
91
|
+
mogrt_name: string;
|
|
92
|
+
track_index?: number;
|
|
93
|
+
start_seconds?: number;
|
|
94
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
|
|
2
|
+
import { sendCommand } from "../bridge/file-bridge.js";
|
|
3
|
+
export function getTextTools(bridgeOptions) {
|
|
4
|
+
return {
|
|
5
|
+
add_text_overlay: {
|
|
6
|
+
description: "Add a text overlay (title) to the active sequence",
|
|
7
|
+
parameters: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
text: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "Text content to display",
|
|
13
|
+
},
|
|
14
|
+
track_index: {
|
|
15
|
+
type: "number",
|
|
16
|
+
description: "Video track index to place the text on (default: topmost track)",
|
|
17
|
+
},
|
|
18
|
+
start_seconds: {
|
|
19
|
+
type: "number",
|
|
20
|
+
description: "Start time in seconds (default: 0)",
|
|
21
|
+
},
|
|
22
|
+
duration_seconds: {
|
|
23
|
+
type: "number",
|
|
24
|
+
description: "Duration in seconds (default: 5)",
|
|
25
|
+
},
|
|
26
|
+
font_size: {
|
|
27
|
+
type: "number",
|
|
28
|
+
description: "Font size (default: 60)",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ["text"],
|
|
32
|
+
},
|
|
33
|
+
handler: async (args) => {
|
|
34
|
+
const startSeconds = args.start_seconds ?? 0;
|
|
35
|
+
const durationSeconds = args.duration_seconds ?? 5;
|
|
36
|
+
const script = buildToolScript(`
|
|
37
|
+
var seq = app.project.activeSequence;
|
|
38
|
+
if (!seq) return __error("No active sequence");
|
|
39
|
+
|
|
40
|
+
var trackIndex = ${args.track_index !== undefined ? args.track_index : "seq.videoTracks.numTracks - 1"};
|
|
41
|
+
|
|
42
|
+
// Create a graphics clip using the captions API approach
|
|
43
|
+
var project = app.project;
|
|
44
|
+
|
|
45
|
+
// Use QE DOM to insert text
|
|
46
|
+
app.enableQE();
|
|
47
|
+
var qeSeq = qe.project.getActiveSequence();
|
|
48
|
+
|
|
49
|
+
// Add a caption track if needed, then add text
|
|
50
|
+
// Note: Direct text creation requires MOGRT or Graphics workspace
|
|
51
|
+
// For basic text, we use the Graphics approach
|
|
52
|
+
var startTicks = __secondsToTicks(${startSeconds}).toString();
|
|
53
|
+
var endTicks = __secondsToTicks(${startSeconds + durationSeconds}).toString();
|
|
54
|
+
|
|
55
|
+
var textContent = "${escapeForExtendScript(args.text)}";
|
|
56
|
+
// Add caption track via QE DOM
|
|
57
|
+
try {
|
|
58
|
+
qeSeq.addCaptionTrack("Subtitle", 0);
|
|
59
|
+
} catch(e) {}
|
|
60
|
+
// Get caption track count
|
|
61
|
+
var captionTrackCount = seq.captionTracks ? seq.captionTracks.numTracks : 0;
|
|
62
|
+
return __result({ added: true, text: textContent, note: "Caption track added. Use create_caption_track with an SRT file for full subtitle workflow.", captionTracks: captionTrackCount });
|
|
63
|
+
`);
|
|
64
|
+
return sendCommand(script, bridgeOptions);
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
import_mogrt: {
|
|
68
|
+
description: "Import a Motion Graphics Template (.mogrt) file and add it to the timeline",
|
|
69
|
+
parameters: {
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
mogrt_path: {
|
|
73
|
+
type: "string",
|
|
74
|
+
description: "Full path to the .mogrt file",
|
|
75
|
+
},
|
|
76
|
+
track_index: {
|
|
77
|
+
type: "number",
|
|
78
|
+
description: "Video track index (default: 0)",
|
|
79
|
+
},
|
|
80
|
+
start_seconds: {
|
|
81
|
+
type: "number",
|
|
82
|
+
description: "Start time in seconds (default: 0)",
|
|
83
|
+
},
|
|
84
|
+
duration_seconds: {
|
|
85
|
+
type: "number",
|
|
86
|
+
description: "Duration in seconds (default: 5)",
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
required: ["mogrt_path"],
|
|
90
|
+
},
|
|
91
|
+
handler: async (args) => {
|
|
92
|
+
const trackIndex = args.track_index ?? 0;
|
|
93
|
+
const startSeconds = args.start_seconds ?? 0;
|
|
94
|
+
const durationSeconds = args.duration_seconds ?? 5;
|
|
95
|
+
const script = buildToolScript(`
|
|
96
|
+
var seq = app.project.activeSequence;
|
|
97
|
+
if (!seq) return __error("No active sequence");
|
|
98
|
+
|
|
99
|
+
var mogrtPath = "${escapeForExtendScript(args.mogrt_path)}";
|
|
100
|
+
var startTicks = __secondsToTicks(${startSeconds}).toString();
|
|
101
|
+
var durationTicks = __secondsToTicks(${durationSeconds}).toString();
|
|
102
|
+
|
|
103
|
+
var success = seq.importMGT(
|
|
104
|
+
mogrtPath,
|
|
105
|
+
startTicks,
|
|
106
|
+
${trackIndex},
|
|
107
|
+
${trackIndex} // audio track index
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
if (!success) return __error("Failed to import MOGRT");
|
|
111
|
+
|
|
112
|
+
return __result({
|
|
113
|
+
imported: true,
|
|
114
|
+
mogrtPath: mogrtPath,
|
|
115
|
+
trackIndex: ${trackIndex},
|
|
116
|
+
startSeconds: ${startSeconds},
|
|
117
|
+
durationSeconds: ${durationSeconds}
|
|
118
|
+
});
|
|
119
|
+
`);
|
|
120
|
+
return sendCommand(script, bridgeOptions);
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
import_mogrt_from_library: {
|
|
124
|
+
description: "Import a MOGRT from an Adobe Library by name",
|
|
125
|
+
parameters: {
|
|
126
|
+
type: "object",
|
|
127
|
+
properties: {
|
|
128
|
+
mogrt_name: {
|
|
129
|
+
type: "string",
|
|
130
|
+
description: "Name of the MOGRT in the library",
|
|
131
|
+
},
|
|
132
|
+
track_index: {
|
|
133
|
+
type: "number",
|
|
134
|
+
description: "Video track index (default: 0)",
|
|
135
|
+
},
|
|
136
|
+
start_seconds: {
|
|
137
|
+
type: "number",
|
|
138
|
+
description: "Start time in seconds (default: 0)",
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
required: ["mogrt_name"],
|
|
142
|
+
},
|
|
143
|
+
handler: async (args) => {
|
|
144
|
+
const trackIndex = args.track_index ?? 0;
|
|
145
|
+
const startSeconds = args.start_seconds ?? 0;
|
|
146
|
+
const script = buildToolScript(`
|
|
147
|
+
var seq = app.project.activeSequence;
|
|
148
|
+
if (!seq) return __error("No active sequence");
|
|
149
|
+
|
|
150
|
+
var seq = app.project.activeSequence;
|
|
151
|
+
if (!seq) return __error("No active sequence");
|
|
152
|
+
return __error("import_mogrt_from_library is not supported via ExtendScript. Adobe Libraries cannot be accessed programmatically. Use import_mogrt with a local file path instead: download the MOGRT from your library first, then use import_mogrt({ mogrt_path: '/path/to/template.mogrt' }).");
|
|
153
|
+
`);
|
|
154
|
+
return sendCommand(script, bridgeOptions);
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=text.js.map
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { BridgeOptions } from "../bridge/file-bridge.js";
|
|
2
|
+
export declare function getTimelineTools(bridgeOptions: BridgeOptions): {
|
|
3
|
+
add_to_timeline: {
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
item_id: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
track_index: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
start_seconds: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
audio_track_index: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
required: string[];
|
|
26
|
+
};
|
|
27
|
+
handler: (args: {
|
|
28
|
+
item_id: string;
|
|
29
|
+
track_index?: number;
|
|
30
|
+
start_seconds?: number;
|
|
31
|
+
audio_track_index?: number;
|
|
32
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
33
|
+
};
|
|
34
|
+
remove_from_timeline: {
|
|
35
|
+
description: string;
|
|
36
|
+
parameters: {
|
|
37
|
+
type: "object";
|
|
38
|
+
properties: {
|
|
39
|
+
node_id: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
ripple: {
|
|
44
|
+
type: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
required: string[];
|
|
49
|
+
};
|
|
50
|
+
handler: (args: {
|
|
51
|
+
node_id: string;
|
|
52
|
+
ripple?: boolean;
|
|
53
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
54
|
+
};
|
|
55
|
+
move_clip: {
|
|
56
|
+
description: string;
|
|
57
|
+
parameters: {
|
|
58
|
+
type: "object";
|
|
59
|
+
properties: {
|
|
60
|
+
node_id: {
|
|
61
|
+
type: string;
|
|
62
|
+
description: string;
|
|
63
|
+
};
|
|
64
|
+
new_start_seconds: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
new_track_index: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
handler: (args: {
|
|
76
|
+
node_id: string;
|
|
77
|
+
new_start_seconds: number;
|
|
78
|
+
new_track_index?: number;
|
|
79
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
80
|
+
};
|
|
81
|
+
trim_clip: {
|
|
82
|
+
description: string;
|
|
83
|
+
parameters: {
|
|
84
|
+
type: "object";
|
|
85
|
+
properties: {
|
|
86
|
+
node_id: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
new_in_seconds: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
new_out_seconds: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
required: string[];
|
|
100
|
+
};
|
|
101
|
+
handler: (args: {
|
|
102
|
+
node_id: string;
|
|
103
|
+
new_in_seconds?: number;
|
|
104
|
+
new_out_seconds?: number;
|
|
105
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
106
|
+
};
|
|
107
|
+
split_clip: {
|
|
108
|
+
description: string;
|
|
109
|
+
parameters: {
|
|
110
|
+
type: "object";
|
|
111
|
+
properties: {
|
|
112
|
+
time_seconds: {
|
|
113
|
+
type: string;
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
track_index: {
|
|
117
|
+
type: string;
|
|
118
|
+
description: string;
|
|
119
|
+
};
|
|
120
|
+
track_type: {
|
|
121
|
+
type: string;
|
|
122
|
+
enum: string[];
|
|
123
|
+
description: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
required: string[];
|
|
127
|
+
};
|
|
128
|
+
handler: (args: {
|
|
129
|
+
time_seconds: number;
|
|
130
|
+
track_index?: number;
|
|
131
|
+
track_type?: string;
|
|
132
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
133
|
+
};
|
|
134
|
+
duplicate_clip: {
|
|
135
|
+
description: string;
|
|
136
|
+
parameters: {
|
|
137
|
+
type: "object";
|
|
138
|
+
properties: {
|
|
139
|
+
node_id: {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
required: string[];
|
|
145
|
+
};
|
|
146
|
+
handler: (args: {
|
|
147
|
+
node_id: string;
|
|
148
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
149
|
+
};
|
|
150
|
+
enable_disable_clip: {
|
|
151
|
+
description: string;
|
|
152
|
+
parameters: {
|
|
153
|
+
type: "object";
|
|
154
|
+
properties: {
|
|
155
|
+
node_id: {
|
|
156
|
+
type: string;
|
|
157
|
+
description: string;
|
|
158
|
+
};
|
|
159
|
+
enabled: {
|
|
160
|
+
type: string;
|
|
161
|
+
description: string;
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
required: string[];
|
|
165
|
+
};
|
|
166
|
+
handler: (args: {
|
|
167
|
+
node_id: string;
|
|
168
|
+
enabled: boolean;
|
|
169
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
170
|
+
};
|
|
171
|
+
set_clip_properties: {
|
|
172
|
+
description: string;
|
|
173
|
+
parameters: {
|
|
174
|
+
type: "object";
|
|
175
|
+
properties: {
|
|
176
|
+
node_id: {
|
|
177
|
+
type: string;
|
|
178
|
+
description: string;
|
|
179
|
+
};
|
|
180
|
+
opacity: {
|
|
181
|
+
type: string;
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
184
|
+
speed: {
|
|
185
|
+
type: string;
|
|
186
|
+
description: string;
|
|
187
|
+
};
|
|
188
|
+
scale: {
|
|
189
|
+
type: string;
|
|
190
|
+
description: string;
|
|
191
|
+
};
|
|
192
|
+
position_x: {
|
|
193
|
+
type: string;
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
position_y: {
|
|
197
|
+
type: string;
|
|
198
|
+
description: string;
|
|
199
|
+
};
|
|
200
|
+
rotation: {
|
|
201
|
+
type: string;
|
|
202
|
+
description: string;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
required: string[];
|
|
206
|
+
};
|
|
207
|
+
handler: (args: {
|
|
208
|
+
node_id: string;
|
|
209
|
+
opacity?: number;
|
|
210
|
+
speed?: number;
|
|
211
|
+
scale?: number;
|
|
212
|
+
position_x?: number;
|
|
213
|
+
position_y?: number;
|
|
214
|
+
rotation?: number;
|
|
215
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
216
|
+
};
|
|
217
|
+
replace_clip: {
|
|
218
|
+
description: string;
|
|
219
|
+
parameters: {
|
|
220
|
+
type: "object";
|
|
221
|
+
properties: {
|
|
222
|
+
node_id: {
|
|
223
|
+
type: string;
|
|
224
|
+
description: string;
|
|
225
|
+
};
|
|
226
|
+
new_item_id: {
|
|
227
|
+
type: string;
|
|
228
|
+
description: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
required: string[];
|
|
232
|
+
};
|
|
233
|
+
handler: (args: {
|
|
234
|
+
node_id: string;
|
|
235
|
+
new_item_id: string;
|
|
236
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
237
|
+
};
|
|
238
|
+
speed_change: {
|
|
239
|
+
description: string;
|
|
240
|
+
parameters: {
|
|
241
|
+
type: "object";
|
|
242
|
+
properties: {
|
|
243
|
+
node_id: {
|
|
244
|
+
type: string;
|
|
245
|
+
description: string;
|
|
246
|
+
};
|
|
247
|
+
speed_percent: {
|
|
248
|
+
type: string;
|
|
249
|
+
description: string;
|
|
250
|
+
};
|
|
251
|
+
reverse: {
|
|
252
|
+
type: string;
|
|
253
|
+
description: string;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
required: string[];
|
|
257
|
+
};
|
|
258
|
+
handler: (args: {
|
|
259
|
+
node_id: string;
|
|
260
|
+
speed_percent: number;
|
|
261
|
+
reverse?: boolean;
|
|
262
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
//# sourceMappingURL=timeline.d.ts.map
|