-
Center align multiple layers along thisComp.height/2?
I have 4 text layers stacked overtop each other, all on the same x value for simplicity. There is a central text layer that (for now) sits in the exact center of the comp, and the other layers take their position value from its yPosition + sourceRect + margin etc while I figure this expression setup out. Some text layers may end up with sourceText for some renders, and others may be left blank, but not deleted.
My question is, if the user opts to use the main text layer + a text layer below it, how can I have the two layers dynamically center around thisComp.height/2? As in, after taking into account their different sourceRect.heights, visually, the layers are positioned in a way that gives perfect balance along the height? Or if there are 3 layers used, etc? I’m comfortable with for loops if that’s necessary, but also happy to rough it with if else statements 🤣. I just am not sure how to wrap my mind around this.