@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,211 @@
|
|
|
1
|
+
import { BridgeOptions } from "../bridge/file-bridge.js";
|
|
2
|
+
export declare function getSequenceTools(bridgeOptions: BridgeOptions): {
|
|
3
|
+
create_sequence: {
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
name: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
preset_path: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
required: string[];
|
|
18
|
+
};
|
|
19
|
+
handler: (args: {
|
|
20
|
+
name: string;
|
|
21
|
+
preset_path?: string;
|
|
22
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
23
|
+
};
|
|
24
|
+
duplicate_sequence: {
|
|
25
|
+
description: string;
|
|
26
|
+
parameters: {
|
|
27
|
+
type: "object";
|
|
28
|
+
properties: {
|
|
29
|
+
sequence_id: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
required: string[];
|
|
35
|
+
};
|
|
36
|
+
handler: (args: {
|
|
37
|
+
sequence_id: string;
|
|
38
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
39
|
+
};
|
|
40
|
+
delete_sequence: {
|
|
41
|
+
description: string;
|
|
42
|
+
parameters: {
|
|
43
|
+
type: "object";
|
|
44
|
+
properties: {
|
|
45
|
+
sequence_id: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
handler: (args: {
|
|
53
|
+
sequence_id: string;
|
|
54
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
55
|
+
};
|
|
56
|
+
set_sequence_settings: {
|
|
57
|
+
description: string;
|
|
58
|
+
parameters: {
|
|
59
|
+
type: "object";
|
|
60
|
+
properties: {
|
|
61
|
+
sequence_id: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
width: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
height: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
handler: (args: {
|
|
76
|
+
sequence_id?: string;
|
|
77
|
+
width?: number;
|
|
78
|
+
height?: number;
|
|
79
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
80
|
+
};
|
|
81
|
+
create_subsequence: {
|
|
82
|
+
description: string;
|
|
83
|
+
parameters: {
|
|
84
|
+
type: "object";
|
|
85
|
+
properties: {
|
|
86
|
+
ignore_track_targeting: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
handler: (args: {
|
|
93
|
+
ignore_track_targeting?: boolean;
|
|
94
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
95
|
+
};
|
|
96
|
+
auto_reframe_sequence: {
|
|
97
|
+
description: string;
|
|
98
|
+
parameters: {
|
|
99
|
+
type: "object";
|
|
100
|
+
properties: {
|
|
101
|
+
sequence_id: {
|
|
102
|
+
type: string;
|
|
103
|
+
description: string;
|
|
104
|
+
};
|
|
105
|
+
target_width: {
|
|
106
|
+
type: string;
|
|
107
|
+
description: string;
|
|
108
|
+
};
|
|
109
|
+
target_height: {
|
|
110
|
+
type: string;
|
|
111
|
+
description: string;
|
|
112
|
+
};
|
|
113
|
+
quality: {
|
|
114
|
+
type: string;
|
|
115
|
+
enum: number[];
|
|
116
|
+
description: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
required: string[];
|
|
120
|
+
};
|
|
121
|
+
handler: (args: {
|
|
122
|
+
sequence_id?: string;
|
|
123
|
+
target_width: number;
|
|
124
|
+
target_height: number;
|
|
125
|
+
quality?: number;
|
|
126
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
127
|
+
};
|
|
128
|
+
unnest_sequence: {
|
|
129
|
+
description: string;
|
|
130
|
+
parameters: {
|
|
131
|
+
type: "object";
|
|
132
|
+
properties: {
|
|
133
|
+
node_id: {
|
|
134
|
+
type: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
required: string[];
|
|
139
|
+
};
|
|
140
|
+
handler: (args: {
|
|
141
|
+
node_id: string;
|
|
142
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
143
|
+
};
|
|
144
|
+
create_sequence_from_preset: {
|
|
145
|
+
description: string;
|
|
146
|
+
parameters: {
|
|
147
|
+
type: "object";
|
|
148
|
+
properties: {
|
|
149
|
+
name: {
|
|
150
|
+
type: string;
|
|
151
|
+
description: string;
|
|
152
|
+
};
|
|
153
|
+
preset_path: {
|
|
154
|
+
type: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
required: string[];
|
|
159
|
+
};
|
|
160
|
+
handler: (args: {
|
|
161
|
+
name: string;
|
|
162
|
+
preset_path: string;
|
|
163
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
164
|
+
};
|
|
165
|
+
attach_custom_property: {
|
|
166
|
+
description: string;
|
|
167
|
+
parameters: {
|
|
168
|
+
type: "object";
|
|
169
|
+
properties: {
|
|
170
|
+
property_id: {
|
|
171
|
+
type: string;
|
|
172
|
+
description: string;
|
|
173
|
+
};
|
|
174
|
+
property_value: {
|
|
175
|
+
type: string;
|
|
176
|
+
description: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
required: string[];
|
|
180
|
+
};
|
|
181
|
+
handler: (args: {
|
|
182
|
+
property_id: string;
|
|
183
|
+
property_value: string;
|
|
184
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
185
|
+
};
|
|
186
|
+
is_work_area_enabled: {
|
|
187
|
+
description: string;
|
|
188
|
+
parameters: {
|
|
189
|
+
type: "object";
|
|
190
|
+
properties: {};
|
|
191
|
+
};
|
|
192
|
+
handler: () => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
193
|
+
};
|
|
194
|
+
get_export_file_extension: {
|
|
195
|
+
description: string;
|
|
196
|
+
parameters: {
|
|
197
|
+
type: "object";
|
|
198
|
+
properties: {
|
|
199
|
+
preset_path: {
|
|
200
|
+
type: string;
|
|
201
|
+
description: string;
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
required: string[];
|
|
205
|
+
};
|
|
206
|
+
handler: (args: {
|
|
207
|
+
preset_path: string;
|
|
208
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=sequence.d.ts.map
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { buildToolScript, escapeForExtendScript } from "../bridge/script-builder.js";
|
|
2
|
+
import { sendCommand } from "../bridge/file-bridge.js";
|
|
3
|
+
export function getSequenceTools(bridgeOptions) {
|
|
4
|
+
return {
|
|
5
|
+
create_sequence: {
|
|
6
|
+
description: `Create a new empty sequence in the project and make it the active sequence.
|
|
7
|
+
|
|
8
|
+
Uses qe.project.newSequence() which works without dialogs in Premiere Pro 2026.
|
|
9
|
+
|
|
10
|
+
If no preset_path is provided, uses the HD 1080p 23.976fps preset. To create a specific format, pass the full path to a .sqpreset file.
|
|
11
|
+
|
|
12
|
+
Common preset paths on Windows:
|
|
13
|
+
- 1920x1080 24fps: C:\\Program Files\\Adobe\\Adobe Premiere Pro 2026\\Settings\\SequencePresets\\HD 1080p\\HD 1080p 23.976 fps.sqpreset
|
|
14
|
+
- 1080x1920 (9:16): C:\\Program Files\\Adobe\\Adobe Premiere Pro 2026\\Settings\\SequencePresets\\Social\\Social Media Portrait 9x16 30 fps.sqpreset
|
|
15
|
+
|
|
16
|
+
Example: create_sequence({ name: "Main Edit" })
|
|
17
|
+
Example: create_sequence({ name: "Vertical", preset_path: "C:\\\\Program Files\\\\Adobe\\\\Adobe Premiere Pro 2026\\\\Settings\\\\SequencePresets\\\\Social\\\\Social Media Portrait 9x16 30 fps.sqpreset" })`,
|
|
18
|
+
parameters: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Name for the new sequence",
|
|
24
|
+
},
|
|
25
|
+
preset_path: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Optional path to a sequence preset file (.sqpreset). Uses HD 1080p 23.976fps if omitted.",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ["name"],
|
|
31
|
+
},
|
|
32
|
+
handler: async (args) => {
|
|
33
|
+
const defaultPreset = "C:\\\\Program Files\\\\Adobe\\\\Adobe Premiere Pro 2026\\\\Settings\\\\SequencePresets\\\\HD 1080p\\\\HD 1080p 23.976 fps.sqpreset";
|
|
34
|
+
const preset = args.preset_path ? escapeForExtendScript(args.preset_path) : defaultPreset;
|
|
35
|
+
const script = buildToolScript(`
|
|
36
|
+
app.enableQE();
|
|
37
|
+
var seqName = "${escapeForExtendScript(args.name)}";
|
|
38
|
+
var presetPath = "${preset}";
|
|
39
|
+
var countBefore = app.project.sequences.numSequences;
|
|
40
|
+
var ok = qe.project.newSequence(seqName, presetPath);
|
|
41
|
+
if (!ok) return __error("qe.project.newSequence returned false — check preset path exists");
|
|
42
|
+
// Find the newly created sequence by name
|
|
43
|
+
var newSeq = null;
|
|
44
|
+
for (var i = 0; i < app.project.sequences.numSequences; i++) {
|
|
45
|
+
if (app.project.sequences[i].name === seqName) {
|
|
46
|
+
newSeq = app.project.sequences[i];
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!newSeq) return __error("Sequence created but not found by name");
|
|
51
|
+
app.project.activeSequence = newSeq;
|
|
52
|
+
return __result({ created: true, name: newSeq.name, id: newSeq.sequenceID, width: newSeq.frameSizeHorizontal, height: newSeq.frameSizeVertical });
|
|
53
|
+
`);
|
|
54
|
+
return sendCommand(script, bridgeOptions);
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
duplicate_sequence: {
|
|
58
|
+
description: "Duplicate an existing sequence",
|
|
59
|
+
parameters: {
|
|
60
|
+
type: "object",
|
|
61
|
+
properties: {
|
|
62
|
+
sequence_id: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "Sequence name or ID to duplicate",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
required: ["sequence_id"],
|
|
68
|
+
},
|
|
69
|
+
handler: async (args) => {
|
|
70
|
+
const script = buildToolScript(`
|
|
71
|
+
var seq = __findSequence("${escapeForExtendScript(args.sequence_id)}");
|
|
72
|
+
if (!seq) return __error("Sequence not found: ${escapeForExtendScript(args.sequence_id)}");
|
|
73
|
+
|
|
74
|
+
seq.clone();
|
|
75
|
+
return __result({ duplicated: true, originalName: seq.name });
|
|
76
|
+
`);
|
|
77
|
+
return sendCommand(script, bridgeOptions);
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
delete_sequence: {
|
|
81
|
+
description: "Delete a sequence from the project",
|
|
82
|
+
parameters: {
|
|
83
|
+
type: "object",
|
|
84
|
+
properties: {
|
|
85
|
+
sequence_id: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Sequence name or ID to delete",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
required: ["sequence_id"],
|
|
91
|
+
},
|
|
92
|
+
handler: async (args) => {
|
|
93
|
+
const script = buildToolScript(`
|
|
94
|
+
var targetId = "${escapeForExtendScript(args.sequence_id)}";
|
|
95
|
+
var seq = __findSequence(targetId);
|
|
96
|
+
if (!seq) return __error("Sequence not found: " + targetId);
|
|
97
|
+
var seqName = seq.name;
|
|
98
|
+
|
|
99
|
+
function findProjectItemByName(parent, name) {
|
|
100
|
+
for (var i = 0; i < parent.children.numItems; i++) {
|
|
101
|
+
var item = parent.children[i];
|
|
102
|
+
if (item.name === name && item.type !== 2) return item;
|
|
103
|
+
if (item.type === 2) {
|
|
104
|
+
var found = findProjectItemByName(item, name);
|
|
105
|
+
if (found) return found;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
app.project.deleteSequence(seq);
|
|
112
|
+
return __result({ deleted: true, name: seqName });
|
|
113
|
+
`);
|
|
114
|
+
return sendCommand(script, bridgeOptions);
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
set_sequence_settings: {
|
|
118
|
+
description: "Modify sequence settings (frame size, frame rate, etc.)",
|
|
119
|
+
parameters: {
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
sequence_id: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Sequence name or ID. Uses active sequence if omitted.",
|
|
125
|
+
},
|
|
126
|
+
width: {
|
|
127
|
+
type: "number",
|
|
128
|
+
description: "Frame width in pixels",
|
|
129
|
+
},
|
|
130
|
+
height: {
|
|
131
|
+
type: "number",
|
|
132
|
+
description: "Frame height in pixels",
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
handler: async (args) => {
|
|
137
|
+
const seqLookup = args.sequence_id
|
|
138
|
+
? `var seq = __findSequence("${escapeForExtendScript(args.sequence_id)}"); if (!seq) return __error("Sequence not found");`
|
|
139
|
+
: `var seq = app.project.activeSequence; if (!seq) return __error("No active sequence");`;
|
|
140
|
+
const width = args.width ?? -1;
|
|
141
|
+
const height = args.height ?? -1;
|
|
142
|
+
const script = buildToolScript(`
|
|
143
|
+
${seqLookup}
|
|
144
|
+
var settings = seq.getSettings();
|
|
145
|
+
if (${width} !== -1) settings.videoFrameWidth = ${width};
|
|
146
|
+
if (${height} !== -1) settings.videoFrameHeight = ${height};
|
|
147
|
+
seq.setSettings(settings);
|
|
148
|
+
var updated = seq.getSettings();
|
|
149
|
+
return __result({ updated: true, name: seq.name, width: updated.videoFrameWidth, height: updated.videoFrameHeight });
|
|
150
|
+
`);
|
|
151
|
+
return sendCommand(script, bridgeOptions);
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
create_subsequence: {
|
|
155
|
+
description: "Create a subsequence (nested sequence) from selected clips or a time range",
|
|
156
|
+
parameters: {
|
|
157
|
+
type: "object",
|
|
158
|
+
properties: {
|
|
159
|
+
ignore_track_targeting: {
|
|
160
|
+
type: "boolean",
|
|
161
|
+
description: "Whether to ignore track targeting (default: false)",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
handler: async (args) => {
|
|
166
|
+
const script = buildToolScript(`
|
|
167
|
+
var seq = app.project.activeSequence;
|
|
168
|
+
if (!seq) return __error("No active sequence");
|
|
169
|
+
|
|
170
|
+
var newSeq = seq.createSubsequence(${args.ignore_track_targeting ? "true" : "false"});
|
|
171
|
+
if (!newSeq) return __error("Failed to create subsequence");
|
|
172
|
+
return __result({ created: true, name: newSeq.name, id: newSeq.sequenceID });
|
|
173
|
+
`);
|
|
174
|
+
return sendCommand(script, bridgeOptions);
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
auto_reframe_sequence: {
|
|
178
|
+
description: "Auto-reframe a sequence for a different aspect ratio",
|
|
179
|
+
parameters: {
|
|
180
|
+
type: "object",
|
|
181
|
+
properties: {
|
|
182
|
+
sequence_id: {
|
|
183
|
+
type: "string",
|
|
184
|
+
description: "Sequence name or ID to reframe. Uses active sequence if omitted.",
|
|
185
|
+
},
|
|
186
|
+
target_width: {
|
|
187
|
+
type: "number",
|
|
188
|
+
description: "Target frame width in pixels",
|
|
189
|
+
},
|
|
190
|
+
target_height: {
|
|
191
|
+
type: "number",
|
|
192
|
+
description: "Target frame height in pixels",
|
|
193
|
+
},
|
|
194
|
+
quality: {
|
|
195
|
+
type: "number",
|
|
196
|
+
enum: [0, 1, 2],
|
|
197
|
+
description: "Motion-tracking quality: 0=Default, 1=More Accurate, 2=Faster. Defaults to 0.",
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
required: ["target_width", "target_height"],
|
|
201
|
+
},
|
|
202
|
+
handler: async (args) => {
|
|
203
|
+
const seqLookup = args.sequence_id
|
|
204
|
+
? `var seq = __findSequence("${escapeForExtendScript(args.sequence_id)}"); if (!seq) return __error("Sequence not found");`
|
|
205
|
+
: `var seq = app.project.activeSequence; if (!seq) return __error("No active sequence");`;
|
|
206
|
+
const quality = args.quality === 1 || args.quality === 2 ? args.quality : 0;
|
|
207
|
+
const script = buildToolScript(`
|
|
208
|
+
${seqLookup}
|
|
209
|
+
// autoReframeSequence(numerator, denominator, motionPresetString). arg1/arg2 are
|
|
210
|
+
// the aspect-ratio fraction (target_width:target_height preserves the ratio);
|
|
211
|
+
// the 3rd arg is a STRING preset, not an integer.
|
|
212
|
+
var __mp = (${quality} === 1 ? "slower" : (${quality} === 2 ? "faster" : "default"));
|
|
213
|
+
seq.autoReframeSequence(${args.target_width}, ${args.target_height}, __mp);
|
|
214
|
+
return __result({ reframed: true, name: seq.name, targetSize: "${args.target_width}x${args.target_height}", motionPreset: __mp });
|
|
215
|
+
`);
|
|
216
|
+
return sendCommand(script, bridgeOptions);
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
unnest_sequence: {
|
|
220
|
+
description: "Unnest a nested sequence on the timeline, replacing it with the contents of the nested sequence",
|
|
221
|
+
parameters: {
|
|
222
|
+
type: "object",
|
|
223
|
+
properties: {
|
|
224
|
+
node_id: {
|
|
225
|
+
type: "string",
|
|
226
|
+
description: "Node ID of the nested sequence clip on the timeline to unnest",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
required: ["node_id"],
|
|
230
|
+
},
|
|
231
|
+
handler: async (args) => {
|
|
232
|
+
const script = buildToolScript(`
|
|
233
|
+
var seq = app.project.activeSequence;
|
|
234
|
+
if (!seq) return __error("No active sequence");
|
|
235
|
+
var targetClip = null;
|
|
236
|
+
for (var t = 0; t < seq.videoTracks.numTracks; t++) {
|
|
237
|
+
for (var c = 0; c < seq.videoTracks[t].clips.numItems; c++) {
|
|
238
|
+
var clip = seq.videoTracks[t].clips[c];
|
|
239
|
+
if (clip.nodeId === "${escapeForExtendScript(args.node_id)}") { targetClip = clip; break; }
|
|
240
|
+
}
|
|
241
|
+
if (targetClip) break;
|
|
242
|
+
}
|
|
243
|
+
if (!targetClip) return __error("Clip not found: ${escapeForExtendScript(args.node_id)}");
|
|
244
|
+
// Try QE DOM unnest
|
|
245
|
+
app.enableQE();
|
|
246
|
+
try {
|
|
247
|
+
targetClip.setSelected(true, true);
|
|
248
|
+
var qeSeq = qe.project.getActiveSequence();
|
|
249
|
+
if (qeSeq && qeSeq.flattenSelectedNest) {
|
|
250
|
+
qeSeq.flattenSelectedNest();
|
|
251
|
+
return __result({ unnested: true, clipName: targetClip.name });
|
|
252
|
+
}
|
|
253
|
+
} catch(e) {}
|
|
254
|
+
return __error("Could not unnest via QE DOM in this PP version. Select the nested clip and use Clip > Nest > Unnest in the UI.");
|
|
255
|
+
`);
|
|
256
|
+
return sendCommand(script, bridgeOptions);
|
|
257
|
+
},
|
|
258
|
+
},
|
|
259
|
+
create_sequence_from_preset: {
|
|
260
|
+
description: "Create a new sequence from a specific preset file (.sqpreset). Uses qe.project.newSequence() — works without dialogs in PP 2026.",
|
|
261
|
+
parameters: {
|
|
262
|
+
type: "object",
|
|
263
|
+
properties: {
|
|
264
|
+
name: {
|
|
265
|
+
type: "string",
|
|
266
|
+
description: "Name for the new sequence",
|
|
267
|
+
},
|
|
268
|
+
preset_path: {
|
|
269
|
+
type: "string",
|
|
270
|
+
description: "Full path to the .sqpreset file",
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
required: ["name", "preset_path"],
|
|
274
|
+
},
|
|
275
|
+
handler: async (args) => {
|
|
276
|
+
const script = buildToolScript(`
|
|
277
|
+
app.enableQE();
|
|
278
|
+
var seqName = "${escapeForExtendScript(args.name)}";
|
|
279
|
+
var presetPath = "${escapeForExtendScript(args.preset_path)}";
|
|
280
|
+
var ok = qe.project.newSequence(seqName, presetPath);
|
|
281
|
+
if (!ok) return __error("qe.project.newSequence returned false — check preset path: " + presetPath);
|
|
282
|
+
var newSeq = null;
|
|
283
|
+
for (var i = 0; i < app.project.sequences.numSequences; i++) {
|
|
284
|
+
if (app.project.sequences[i].name === seqName) {
|
|
285
|
+
newSeq = app.project.sequences[i];
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (!newSeq) return __error("Sequence created but not found by name");
|
|
290
|
+
app.project.activeSequence = newSeq;
|
|
291
|
+
return __result({ created: true, name: newSeq.name, id: newSeq.sequenceID, width: newSeq.frameSizeHorizontal, height: newSeq.frameSizeVertical });
|
|
292
|
+
`);
|
|
293
|
+
return sendCommand(script, bridgeOptions);
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
attach_custom_property: {
|
|
297
|
+
description: "Attach a custom property (key/value pair) to the active sequence",
|
|
298
|
+
parameters: {
|
|
299
|
+
type: "object",
|
|
300
|
+
properties: {
|
|
301
|
+
property_id: {
|
|
302
|
+
type: "string",
|
|
303
|
+
description: "Unique identifier for the custom property",
|
|
304
|
+
},
|
|
305
|
+
property_value: {
|
|
306
|
+
type: "string",
|
|
307
|
+
description: "Value for the custom property",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
required: ["property_id", "property_value"],
|
|
311
|
+
},
|
|
312
|
+
handler: async (args) => {
|
|
313
|
+
const script = buildToolScript(`
|
|
314
|
+
var seq = app.project.activeSequence;
|
|
315
|
+
if (!seq) return __error("No active sequence");
|
|
316
|
+
seq.attachCustomProperty("${escapeForExtendScript(args.property_id)}", "${escapeForExtendScript(args.property_value)}");
|
|
317
|
+
return __result({ attached: true, propertyId: "${escapeForExtendScript(args.property_id)}", value: "${escapeForExtendScript(args.property_value)}" });
|
|
318
|
+
`);
|
|
319
|
+
return sendCommand(script, bridgeOptions);
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
is_work_area_enabled: {
|
|
323
|
+
description: "Check whether the work area bar is enabled on the active sequence",
|
|
324
|
+
parameters: {
|
|
325
|
+
type: "object",
|
|
326
|
+
properties: {},
|
|
327
|
+
},
|
|
328
|
+
handler: async () => {
|
|
329
|
+
const script = buildToolScript(`
|
|
330
|
+
var seq = app.project.activeSequence;
|
|
331
|
+
if (!seq) return __error("No active sequence");
|
|
332
|
+
var enabled = false;
|
|
333
|
+
var available = false;
|
|
334
|
+
try {
|
|
335
|
+
if (typeof seq.isWorkAreaEnabled === "function") {
|
|
336
|
+
available = true;
|
|
337
|
+
enabled = seq.isWorkAreaEnabled();
|
|
338
|
+
} else if (typeof seq.isWorkAreaBarEnabled === "function") {
|
|
339
|
+
available = true;
|
|
340
|
+
enabled = seq.isWorkAreaBarEnabled();
|
|
341
|
+
} else if (seq.workAreaEnabled !== undefined) {
|
|
342
|
+
available = true;
|
|
343
|
+
enabled = seq.workAreaEnabled;
|
|
344
|
+
}
|
|
345
|
+
} catch(e) {
|
|
346
|
+
// API exists but threw, or not found — report disabled + unavailable so callers can distinguish
|
|
347
|
+
return __result({ sequenceName: seq.name, enabled: false, available: false, workAreaEnabled: false });
|
|
348
|
+
}
|
|
349
|
+
return __result({ sequenceName: seq.name, enabled: enabled, available: available, workAreaEnabled: enabled });
|
|
350
|
+
`);
|
|
351
|
+
return sendCommand(script, bridgeOptions);
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
get_export_file_extension: {
|
|
355
|
+
description: "Get the file extension that would be used when exporting the active sequence with a given preset",
|
|
356
|
+
parameters: {
|
|
357
|
+
type: "object",
|
|
358
|
+
properties: {
|
|
359
|
+
preset_path: {
|
|
360
|
+
type: "string",
|
|
361
|
+
description: "Full path to the export preset file (.epr)",
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
required: ["preset_path"],
|
|
365
|
+
},
|
|
366
|
+
handler: async (args) => {
|
|
367
|
+
const script = buildToolScript(`
|
|
368
|
+
var seq = app.project.activeSequence;
|
|
369
|
+
if (!seq) return __error("No active sequence");
|
|
370
|
+
var ext = seq.getExportFileExtension("${escapeForExtendScript(args.preset_path)}");
|
|
371
|
+
return __result({ sequenceName: seq.name, presetPath: "${escapeForExtendScript(args.preset_path)}", extension: ext });
|
|
372
|
+
`);
|
|
373
|
+
return sendCommand(script, bridgeOptions);
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=sequence.js.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { BridgeOptions } from "../bridge/file-bridge.js";
|
|
2
|
+
export declare function getSourceMonitorTools(bridgeOptions: BridgeOptions): {
|
|
3
|
+
open_in_source: {
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: "object";
|
|
7
|
+
properties: {
|
|
8
|
+
item_id: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
required: string[];
|
|
14
|
+
};
|
|
15
|
+
handler: (args: {
|
|
16
|
+
item_id: string;
|
|
17
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
18
|
+
};
|
|
19
|
+
close_source_monitor: {
|
|
20
|
+
description: string;
|
|
21
|
+
parameters: {};
|
|
22
|
+
handler: () => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
23
|
+
};
|
|
24
|
+
close_all_source_clips: {
|
|
25
|
+
description: string;
|
|
26
|
+
parameters: {};
|
|
27
|
+
handler: () => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
28
|
+
};
|
|
29
|
+
set_source_in_out: {
|
|
30
|
+
description: string;
|
|
31
|
+
parameters: {
|
|
32
|
+
type: "object";
|
|
33
|
+
properties: {
|
|
34
|
+
in_seconds: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
out_seconds: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
handler: (args: {
|
|
45
|
+
in_seconds?: number;
|
|
46
|
+
out_seconds?: number;
|
|
47
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
48
|
+
};
|
|
49
|
+
insert_from_source: {
|
|
50
|
+
description: string;
|
|
51
|
+
parameters: {
|
|
52
|
+
type: "object";
|
|
53
|
+
properties: {
|
|
54
|
+
video_track_index: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
audio_track_index: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
handler: (args: {
|
|
65
|
+
video_track_index?: number;
|
|
66
|
+
audio_track_index?: number;
|
|
67
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
68
|
+
};
|
|
69
|
+
overwrite_from_source: {
|
|
70
|
+
description: string;
|
|
71
|
+
parameters: {
|
|
72
|
+
type: "object";
|
|
73
|
+
properties: {
|
|
74
|
+
video_track_index: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
audio_track_index: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
handler: (args: {
|
|
85
|
+
video_track_index?: number;
|
|
86
|
+
audio_track_index?: number;
|
|
87
|
+
}) => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
88
|
+
};
|
|
89
|
+
get_source_monitor_info: {
|
|
90
|
+
description: string;
|
|
91
|
+
parameters: {};
|
|
92
|
+
handler: () => Promise<import("../bridge/file-bridge.js").CommandResult>;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=source-monitor.d.ts.map
|