• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AEFT Script to find duplicate comp?

New Here ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

Hi Friends, I'm new to After effects scripting. Is there anyway to find the duplicate comp using comp name?

Thanks in advance

TOPICS
Scripting

Views

393

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

This simple example should find all the comps named "Comp 1":

var compName = "Comp 1";

var comps = [];

for (var i = 1; i <= app.project.numItems; i++){

  if ((app.project.item(i) instanceof CompItem) && (app.project.item(i).name == compName)){

    comps.push(app.project.item(i));

  }

}

alert(comps.length);

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2023 Nov 02, 2023

Copy link to clipboard

Copied

LATEST

Hello,

Is it possible to do that just by selecting a comp and launch a script to find comps with the same name ?

(to find comps by name, you just have to use the search bar)

Thx

Philippe

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines