Skip to main content
Participant
April 4, 2013
Answered

How to duplicate a composition in after effects and make it independent from the original

  • April 4, 2013
  • 9 replies
  • 233137 views

Hi, im trying to duplicate a composition in after effects and make it independent from the original but it seems to be imposible.. im working on CS5.

Can somebody help me PLEASE??

Thanks

Correct answer Rick Gerard

As Andrew said, select a comp in the Project Panel, not in the timeline, and press Ctrl/Cmnd + D. You'll get a new comp with a number or copy added to the name. This comp is completely independent of the original one but it contains all of the same footage.

If the comp you duplicated contains other comps nested in the timeline then these nested comps must also be duplicated and their duplicates used to replace the original nested compositions in the duplicate comp. The script referred to makes this easy. Most projects created by new users do not have a lot of nested comps so it's not usually a big deal to do this step by hand.

If you post a screenshot of the timeline for the comp you need duplicated or better yet the flow chart we can point out exactly what needs to be duplicated in the Project panel to give you an independent duplicate composition. Duplicating a composition nested in a timeline does not give you a unique copy.

One more thing. Any time you select layers in your timeline and Pre-compose them you create a new composition that is now nested in your original. It's a good practice to arrange all pre-comps in the Project Panel into a folder with a name that lets you know where these pre-comps go. This will make the job of duplicating main comps much easier.

9 replies

Participant
October 3, 2024

here is a script I created to do this - just select the comp you want to duplicate in your project panel and run this script file - if you don't know how to make a jsx from this just open TextEdit on a Mac (not sure what it is on Windows) and paste this > in the top bar click Format and select Make Plain Text > save it > go into your Finder and rename the file with .jsx at the end, and then you can run it in after effects enjoy!

// Duplicate selected comp and all nested comps
(function() {
    var proj = app.project;

    // Function to recursively duplicate a composition and all nested comps
    function duplicateComp(comp, compMap) {
        // If comp is already duplicated, return the duplicated one
        if (compMap[comp.id]) {
            return compMap[comp.id];
        }

        // Duplicate the main comp
        var duplicatedComp = comp.duplicate();
        duplicatedComp.name = comp.name + "_copy";

        // Add the duplicated comp to the map
        compMap[comp.id] = duplicatedComp;

        // Loop through all layers to find nested comps
        for (var i = 1; i <= duplicatedComp.numLayers; i++) {
            var layer = duplicatedComp.layer(i);

            if (layer.source && layer.source instanceof CompItem) {
                // Recursively duplicate the nested comp
                var nestedComp = layer.source;
                var duplicatedNestedComp = duplicateComp(nestedComp, compMap);

                // Replace the original nested comp with the duplicated one
                layer.replaceSource(duplicatedNestedComp, false);
            }
        }

        return duplicatedComp;
    }

    app.beginUndoGroup("Duplicate Comp with Nested Comps");

    if (proj.selection.length > 0 && proj.selection[0] instanceof CompItem) {
        var selectedComp = proj.selection[0];

        // Map to store duplicated comps to avoid duplicating the same comp multiple times
        var compMap = {};
        duplicateComp(selectedComp, compMap);

        alert("Duplicate process completed!");
    } else {
        alert("Please select a composition in the Project panel.");
    }

    app.endUndoGroup();
})();

 

Participant
July 26, 2024

This is a pefect solution for that!
https://youtu.be/2nX-dVSIr7g

ThuridWadewitz_wob
Participating Frequently
July 29, 2024

No, it is not - as it is a paid plugin. AND you have to duplicate in the panel, which does not duplicate adjustments.

ThuridWadewitz_wob
Participating Frequently
January 25, 2024

I have the same problem - duplicating the composition in the project panel does not help if you have a composition with too many adjustments - cuts, keyframes, effects etc., that you have to add to the new composition.

Participant
October 26, 2023

I copied all the layers/rows of the original comp I wanted to duplicate, then selected (composition>new), and pasted the components into it. Then I dragged the new comp back into my timeline from the Project and this stopped linking the two comps together. Hope that helps! 

Participant
November 29, 2023

@Ciara Tobin Tried that. Didn't work. I'll give the script mentioned above a shot. 

Pixel Polar Stock
Participant
December 22, 2022

I thought all the answers here are possible ways to solve your problem.

I will offer one more.

You can save the precomposition as an Ae. project and then import it into your home project.

Use the following steps:
- Identify the precomposition you want to duplicate and then save your project under a different name. Something that is easy to identify.

- In the original project, import the saved project - as if you were importing a common file such as an image or video - file/import - I think you'll need to create an organization folder for these imports.

- Then just repeat the process and import the Ae project every time you want to duplicate it independently.

 

As you are importing a project, you can make it easy by consolidating duplicate files in file/dependencies/consolidate all footage.

 

This helped me with more complex projects where I had a lot of precompositions within other precompositions. But this's a short cut until there was a native After Effects way to allow independent duplication of precompositions.

Participant
March 22, 2023

This is a clean and simple way to deal with this clumsy process, I agree. This video has a great process for saving the composition cleanly, as well. It makes it easy to import only the comp you want. https://www.youtube.com/watch?v=6dQXFAtzZXQ

Known Participant
July 22, 2020

this is insanely too complicated and time consuming, how come they never thought EVERYBODY wants this to be done easily in just one step ?!

Community Expert
July 25, 2020

There is a script called True Comp Duplicator - aescripts.com that does this automatically. Somebody did think of it. 

Known Participant
July 27, 2020

thx !

angie_taylor
Legend
March 22, 2019

Can you tell me what you are trying to achieve by du-locating them and what steps you are trying that aren’t working? Please describe in as much detail the steps you have taken. Thanks

Andrew Yoole
Inspiring
April 4, 2013

What processing are you using to duplicate your composition? 

If you select a comp in the project window and then duplicate, you will create a duplicate comp that is independent of the first.  HOWEVER, if there are nested compositions within your comp, then these will remain true to their original source compositions.  You may need to duplicate and replace those precomps within your duplicate comp.  Or, as shown above, there's a script to automate the process.

Participant
April 4, 2013

Yeah, but i was trying not to spend money on it.. just for another way to do it

Participant
April 4, 2013

If you look closer this script is "name your own price" so you could even enter 0$, download and try the script and if you like it and feel that the author really deserved it and feel like motivating him to spend some more time writing other useful scripts donate a fair amount later on.

If you don't feel like buying or trying you can do this the classic way and duplicate your comps and precomps and change the precomps inside to new comps with the new precomps by selecting your old precomp and alt-drag your new precomp over it. Sounds boring? It is

Participant
April 4, 2013

(I want to make it independent for change the items and effects...)

Participant
April 4, 2013

Have you tried this script yet: http://aescripts.com/true-comp-duplicator/

Participant
April 19, 2022

The best script EVER!

Thanks