I'm sorry the title is confusing. I'm not sure how to describe this more succintly, but an example will tell you what I'm after:
I have a shape layer, a rectangle with rounded corners. I want it anchored from the top edge and I want to maintain the same radius of the rounded corners no matter what size changes I make to the rectangle. The size property seems to ignore both the layer anchor point and the (smaller) shape anchor point. Changes to the size property are anchored in the center of the shape. All I can get to work is an expression. It works great, but there must be an easier way that I'm missing! Can anyone tell me an easier way?
Here's my expression solution:
On the Rectangle Path 1 > Position property
x = content("Rectangle 1").content("Rectangle Path 1").position; y = content("Rectangle 1").content("Rectangle Path 1").position; y += .5*content("Rectangle 1").content("Rectangle Path 1").size; [x,y]
Essentially I have the shape positioning itself according to the size property, freezing the top edge in place no matter what height changes I make to Rectangle 1.
Any tips appreciated. Thanks!
Copy link to clipboard
This is how it's done. However, it's much more intuitive to apply the Expression to the Rectangle's Content>Transform>AnchorPoint property.
And your Expression can be simplified since you're only wanting to offset the AnchorPoint's y value.
y = -.5*content("Rectangle 1").content("Rectangle Path 1").size;
Thank you Roland!
It took you a while to come back onboard, Michael.
Thanks for replying and have a great year ahead.
Do keep us in mind as you push ahead in 2021 — Happy New Year to You and Your Lovely Ones.
It's great to have a solution but how lame is it that we need to write code to overcome a system that completely ignores 2 anchor points! 🙂
Just another way Adobe products actively work against it's users.