ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Align layers edge-to-edge expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Filip Stillerska
Align layers edge-to-edge expression
on Apr 13, 2020 at 1:23:31 pm

I have a total of 127 layers that I want to align edge-to-edge horizontally with each other. I think this could be done with expressions. Something like:

[position of the layer above the current one in the layer stack (a.k.a. the layer with a -1 lower index)]+[50% of the horizontal resolution of the layer above the current one (since anchor point is centered and that's where the position is measured from]+[50% of the horizontal resolution of the current layer]

I believe something like that should mathematically align all layers edge-to-edge horizontally, even though they all have different aspect ratios (but share the same vertical resolution).

Any ideas?


Return to posts index

Tomas Bumbulevičius
Re: Align layers edge-to-edge expression
on Apr 13, 2020 at 9:26:26 pm

Hey Filip, there are some other things to take into account.
1. Are layers scaled in any ways or all 100% original size?
2. What type of layers are they - media, or variety of different ones? (Including shapes/texts, etc)
3. Are anchor points changed or originally in the center?

Your assumption are spot on and it is possible to do that, just its required to take into account on above. Based on your answers I could provide you a way to deal with it.

Find out more:
Motion Graphics Design & After Effects Tutorials
On YT
On VH


Return to posts index

Filip Stillerska
Re: Align layers edge-to-edge expression
on Apr 14, 2020 at 2:24:32 pm

Hello Tomas,
I did this manually, and it didn't take longer than an hours or so.
However, if anyone in the future needs an expression for something like this, I will still answer your questions:

(1) They are scaled due to different resolutions (they are scaled using "Fit To Comp Height").
(2) They are all JPG or PNG-files.
(3) Anchor points are not changed: they are all centered.

Thank you for your help!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]