-
Shape Layer Anchor Point & Scaling
Trying to use expressions on a shape layer’s position, which acts as an anchor point when adjusting size (since anchor points don’t seem to effect a shape layer’s scaling center).
As you can see in the photo, I’m trying to add two expression controllers. One controls how wide the rectangle is, the other controls the anchor point being justified left or right on the rectangle.
That’s working fine, but I can’t figure out how to get the rectangle to remain in the same position when I select/deselect the checkbox. I assumed it would be something like:
WidSize = content("Rectangle 1").content("Rectangle Path 1").size[0];
HeightSize= content("Rectangle 1").content("Rectangle Path 1").size[1];if (effect("AnchorLeft")("Checkbox")==1) [WidSize/2- WidSize,HeightSize] else [WidSize/-2,HeightSize]
But that is not working. I felt like I was on the right path because when I change it to:
WidSize = content("Rectangle 1").content("Rectangle Path 1").size[0];
HeightSize= content("Rectangle 1").content("Rectangle Path 1").size[1];if (effect("AnchorLeft")("Checkbox")==1) [WidSize/2- 500,HeightSize] else [WidSize/-2,HeightSize]
It then appears to stay in the same position. How do I subtract that width value?
Thank you,
Colton


