-
Vertically Align Text Layers via Script
I’ve been fiddling with trying to get this to work for a while, but I just can’t seem to wrap my head around it. It’s easy to horizontally align text layers via scripting because you can just use ParagraphJustification.CENTER_JUSTIFY, but there isn’t a similar control to do the same thing for the y-axis. Essentially I’m trying to figure out how to use this button via my script.
I can grab the layers values for top, height, composition height, and was able to correctly use the examples from this old thread to make it align to the top of the comp, or the bottom of the comp, but haven’t been able to wrap my head around coming up with the equation to make it align to the middle of the comp. Any help is greatly appreciated!
