Ukramedia

Login

How to Automatically Get the Size of Many Layers

In this tutorial, Sergei Prokhnevskiy will show you how to automatically get the size of many layers using expressions in After Effects. Click here to learn more about expressions.

Code:

keyword = “ukramedia”;
widthList = [];

for(i = 1; i <= thisComp.numLayers; i++) {
layerPath = thisComp.layer(i);
layerWidth = layerPath.sourceRectAtTime().width;
if(layerPath.name.match(keyword)) {widthList.push(layerWidth)} else {};
}

Math.max(…widthList) + 100

Project File


Recommended Resourses:

April 24, 2020

We're trusted by these great organizations.

FEATURED IN & ON:

Kingsport Times News

Join us and 25,000+ Artists

Subscribe to gain access to exclusive freebies

No spam, promise!
top

© 2020 Ukramedia, LLC