Skip to main content
Participant
February 17, 2026
Answered

ExtendScript: How to retain Effects when copying TrackItems between Sequences?

  • February 17, 2026
  • 3 replies
  • 199 views

Hi everyone,

I am currently developing a script to automate a Transition Pack workflow in Premiere Pro. My goal is to copy specific clips—specifically Adjustment Layers with various Effects—from a "Source Sequence" into a "Main Sequence."

I’ve been studying the approach discussed in this 3-year-old thread: Get videoTracks from projectItem and copy video/audioTracks to main sequence

In that discussion, it was suggested to use sequence.clone() and delete unwanted items as a workaround for the lack of a direct "Un-nested" sequence insertion API.

My current implementation:

  1. I use sequence.clone() to get a copy of the source sequence containing the transition.

  2. I iterate through the tracks of the cloned sequence to find the target trackItem.

  3. I retrieve the source via trackItem.projectItem.

  4. I then use videoTrack.insertClip(projectItem, time) to place that item into my Main Sequence.

The Problem: While the clip is successfully placed in the Main Sequence, all Effects attached to the original trackItem are lost. It reverts to a "clean" Adjustment Layer.

It seems that trackItem.projectItem only references the raw asset in the Project Panel, not the specific "instance" on the timeline that holds the effect data. However, if I manually use Ctrl+C / Ctrl+V in the Premiere UI, all effects and keyframes are preserved perfectly.

My Questions:

  1. Is there any way via ExtendScript to copy a TrackItem including its Effects/Keyframes from one sequence to another?

  2. Since the API cannot toggle the "Insert and overwrite sequences as nests or individual clips" button, is there a way to "merge" the content of my cloned sequence into the Main Sequence while keeping the track items' effects intact?

  3. If insertClip() always results in a clean clip, what is the recommended professional workaround for automating transition packs that rely on Adjustment Layers?

Any insights or guidance from the community would be greatly appreciated. Thank you!

    Correct answer bbb_999

    In this case, I can only help by pointing out that there is no API (ExtendScript or UXP) that allows for cloning/duplicating an existing trackItem. 

    [Yes, we plan to change that, once we finish out our “ExtendScript:UXP parity” work...]

    3 replies

    MyerPj
    Community Expert
    Community Expert
    March 1, 2026

    Let’s see if ​@Bruce Bullis can lend a hand.

    bbb_999
    Community Manager
    bbb_999Community ManagerCorrect answer
    Community Manager
    March 2, 2026

    In this case, I can only help by pointing out that there is no API (ExtendScript or UXP) that allows for cloning/duplicating an existing trackItem. 

    [Yes, we plan to change that, once we finish out our “ExtendScript:UXP parity” work...]

    MyerPj
    Community Expert
    Community Expert
    February 28, 2026

    @fireonicecube 

    Excuse my post here, I haven’t programmed in Premiere but I have programmed api’s and such. On your comment:

    1. I retrieve the source via trackItem.projectItem.

    That’s what I would  have thought would be the problem, not pasting. You are not grabbing the AL with modifications that exist on the timeline, but the plain old vanilla AL that’s in the project?

     

    Am I thinking of this wrong?🤔

     

    Participant
    March 1, 2026

    Hi ​@MyerPj

    Thank you for your reply!

    You are exactly right—that is where the issue lies. By using .projectItem, I am referencing the "clean" version of the Adjustment Layer from the Project Panel, which doesn't contain any of the effects or keyframes I applied on the timeline.

    The problem is that I cannot pass a trackItem (the clip instance already on the timeline) directly into the insertClip() method like this:

    JavaScript

     

    app.project.activeSequence.insertClip(
    app.project.sequences[i].videoTracks[i].clips[i], // Using TrackItem instead of .projectItem
    time,
    vTrackIndex,
    aTrackIndex
    );

    Doing this causes Premiere Pro to crash immediately. It seems the function is strictly designed to only accept a projectItem as its argument, which makes it impossible to "carry over" effects using this standard approach.

    From what I've researched, the only potential workaround seems to be using the QE DOM to simulate a copy/paste action, but it's known to be an unofficial and unstable API.

    Thanks again for helping me confirm the logic!

     

     

    Participant
    February 20, 2026

    Update: Investigation into History Panel behaviors (Insert vs. Paste)

    I’ve discovered some information by monitoring the History Panel during my manual vs. scripted tests:

    1. Using videoTrack.insertClip(): The History Panel records this as "Insert". As suspected, this only pulls the raw projectItem from the Project Panel, stripping away all custom effects and keyframes. 

    2. Using Manual Ctrl+C / Ctrl+V: The History Panel records this as "Paste". This action successfully preserves all Effect Components and Keyframes. 

    The Gap in the API: I have thoroughly searched the Premiere Pro Scripting Guide and the PProPanel Sample Code, but I cannot find any API method that triggers a "Paste" command or allows us to copy a trackItem object directly.

    My Question: Is there a hidden method or a workaround to trigger a Clipboard-based Copy/Paste via ExtendScript that targets a specific trackItem? Or is there a way to access the components (Effects) of a trackItem and manually "inject" them into a newly inserted clip?

    It seems that without a way to replicate the "Paste" behavior, automating any workflow involving Adjustment Layers with complex effects is currently hit a dead end. Any advice would be appreciated!

    Known Participant
    February 28, 2026

    I was looking for a solution as well, but it looks like the only options are using workarounds like ahk or simulating key presses with appleScript. 

    Another thing that can work is creating control surface that can actually perform those actions like copy and paste. But that’s another challenge in itself.

    Participant
    February 28, 2026

    Hi Leyero,

    Thank you for the suggestions! You're absolutely right—the gap between the "Insert" (Project-based) and "Paste" (Timeline-based) behaviors in the History Panel seems to be the core of the issue.

    I’ve also been digging into this on other developer channels and received some interesting insights from another experienced dev (Justin Taylor) that might be worth exploring if you're still looking for a workaround:

    1. The QE DOM (Undocumented): It turns out there's a "hidden" API layer called QE DOM. While it can be unreliable, it offers methods like move() or moveToTrack() with a copyClip flag that might bypass the standard insertClip() limitations. You can find the unofficial documentation for these extra types here: https://github.com/docsforadobe/types-for-adobe-extras

    2. The "Replace Media" Trick: Instead of inserting a clean clip, another route is to sequence.clone() the source (which preserves the effects), and then programmatically use changeMediaPath() to swap the underlying asset. This keeps the "TrackItem Instance" (and its effects) intact while updating the content.

    It's a bit of a "Wild West" area of Premiere scripting, but these routes seem more promising than building a full Control Surface! Thanks again for jumping in to help.