Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Looping through layers and selecting layer by name?

$
0
0

I am trying to find a layer by name and loop through the selections.

 

function projectItem(name)

{

          var items = app.project.items;

          i = 1;

          while (i <= items.length) {

                              if (items[i].name == name)

                              {

                                        return app.project.item(i);

                                        break;

                              }

                              i++;

                    }

}

 

This works right?


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>