Hi,
Before I begin, I’d like to apologize that I wrote this using AI since my English skills couldn’t elaborate the situation I had enough. Thanks for your understanding.
I’m encountering a perplexing issue while developing a UXP panel for Premiere Pro 25.3 Beta (macOS 15.3.1). My goal is to programmatically adjust the In and Out points of multiple selected video clips in the active sequence to distribute them evenly within the sequence’s In/Out range.
The Problem:
My JavaScript code seems to execute correctly without throwing any errors. Logs confirm the following steps are successful:
-
Getting the active project and sequence.
-
Getting the selected track items.
-
Filtering for video clips (using trackItem.getType() === 1, which works).
-
Calculating the target duration and individual clip durations based on sequence In/Out points.
-
Getting the start time of the first selected clip (await trackItem.getStartTime()).
-
Looping through the selected clips and successfully creating Action objects using await clip.createSetInPointAction(tickTimeObject) and await clip.createSetOutPointAction(tickTimeObject). (Confirmed by logging the resulting Action {} objects).
-
Adding these actions to a compound action within project.executeTransaction.
-
The project.executeTransaction(…) promise resolves successfully, and its .then((result) => …) block receives true as the result.
However, despite all logs indicating success and executeTransaction returning true, absolutely no changes are applied to the clips on the Premiere Pro timeline. The In/Out points remain unchanged. It’s a “silent failure.”
Debugging Steps Taken:
-
Verified API Calls: Confirmed that getting project, sequence, selection, and clip type works as expected.
-
Confirmed Action Creation: Logged the results of createSetInPoint/OutPointAction calls, which successfully return Action {} objects.
-
Confirmed Transaction Result: Explicitly checked the boolean value returned by project.executeTransaction, which is true.
-
Action Creation Inside Transaction: Moved the createSet…Action calls inside the executeTransaction callback, as suggested in some forum posts for other actions. This did not resolve the issue.
-
Simplified Test: Reduced the logic to only modify the OutPoint of the first selected clip using a single createSetOutPointAction. This also resulted in a silent failure (logs success, executeTransaction returns true, but no timeline change).
-
TickTime Creation: Tried creating TickTime objects using both new TickTime(ticks.toString()) and ppro.TickTime.createWithSeconds(seconds). Both methods successfully create TickTime objects according to the logs, but neither resolves the silent failure.
-
Official Sample Plugin Test: Crucially, I built and tested the official 3psample-panel from the uxp-premiere-pro-samples repository in the exact same Premiere Pro 25.3 Beta environment. The Clone Selected TrackItem to Another Track function in the sample successfully modifies the timeline. This suggests that executeTransaction and the Action mechanism can work in this beta version, but potentially not with createSetInPointAction or createSetOutPointAction.
Code Snippet (Simplified loop structure):
// Assume 'project', 'selectedClips', 'individualClipDurationTicks', 'currentPositionTicks' are valid
// Using temporary default for sequenceFrameRate as auto-detection failed
const sequenceFrameRate = 254016000000;
const ppro = require("premierepro"); // Assuming ppro is alias for premierepro
try {
await project.lockedAccess(async () => {
let transactionSuccess = false;
await project.executeTransaction(async (transaction) => {
console.log("Starting transaction for clip adjustments...");
let transactionCurrentPositionTicks = currentPositionTicks;
for (let i = 0; i < selectedClips.length; i++) {
const clip = selectedClips[i];
const startTicks = transactionCurrentPositionTicks;
const newEndTicks = startTicks + individualClipDurationTicks;
// Calculate time in seconds for createWithSeconds
const startTimeInSeconds = Number(startTicks * 1000000n / BigInt(sequenceFrameRate)) / 1000000.0;
const endTimeInSeconds = Number(newEndTicks * 1000000n / BigInt(sequenceFrameRate)) / 1000000.0;
// InPoint Action (for clips after the first)
if (i > 0 && typeof clip.createSetInPointAction === 'function') {
const tickTimeForIn = ppro.TickTime.createWithSeconds(startTimeInSeconds);
const setInAction = await clip.createSetInPointAction(tickTimeForIn);
if (setInAction) transaction.addAction(setInAction);
else console.error("Failed to create SetInPointAction");
}
// OutPoint Action
if (typeof clip.createSetOutPointAction === 'function') {
const tickTimeForOut = ppro.TickTime.createWithSeconds(endTimeInSeconds);
const setOutAction = await clip.createSetOutPointAction(tickTimeForOut);
if (setOutAction) transaction.addAction(setOutAction);
else console.error("Failed to create SetOutPointAction");
}
transactionCurrentPositionTicks = newEndTicks;
}
console.log("All adjustment actions added to transaction.");
}, "Adjust Clip Lengths")
.then((result) => {
transactionSuccess = result;
console.log(`Transaction execution result: ${result}`);
})
.catch((err) => {
console.error("Error during transaction execution:", err);
transactionSuccess = false;
});
if (transactionSuccess) {
console.log("Executed transaction successfully (according to return value).");
} else {
console.error("Executed transaction FAILED (according to return value or error).");
}
});
console.log("Clip length adjustment attempts complete (JS level).");
} catch (error) {
console.error("Error adjusting clip lengths:", error);
}
Questions:
-
Is this silent failure with createSetInPointAction/createSetOutPointAction within executeTransaction a known issue or bug in Premiere Pro 25.3 Beta?
-
Is there a specific way TickTime objects need to be created or formatted for these particular actions in this beta version that I might be missing?
-
Are there any alternative methods or workarounds to reliably set the In and Out points of TrackItems using the UXP API in Premiere Pro 25.3 Beta?
Any insights or suggestions would be enormously appreciated. Thank you.