-
Would love some input
I’m very, very new to expressions and today I worked on a position expression for a project. For those who are seasoned in expressions, I’d love to hear any pointers you might have on where I could simplify. I know it’s probably very redundant and quite honestly a mess, but it’s tricky to pinpoint improvements as I’m just starting out.
Here’s the expression: https://pastebin.com/Uhv6EZZ1
Basically I have an off-centered pre-rendered element that needs to align with other objects in the comp, but ALSO needs to be rotatable and mirrorable. The expression in question auto aligns by compensating the position, while giving you the ability to rotate in 90 degree increments and flip on X, Y, or both. After working on this expression I realize I’m repeating a lot of variables over and over again. But I’m not too sure on how I’d go about simplifying. Any thoughts?
Thanks!
-MJ