2

Property "Size" scale rectangle in two directions, like a mirror. And "Scale" distort roundness.

How scale rectangle in one direction without roundness scale without expressions?

3 Answers 3

2

Assuming this is a shape layer created with the rectangle tool, you can solve this by going to Shape Layer 1 -> Contents -> Rectangle 1 -> Rectangle Path 1 -> Size, and unchecking the icon that looks like two chain links, and then changing either of the two numeric values independently to change either the width or height of the rectangle, without changing or distorting the roundness.

screen shot

2
  • This change Height or Width in two directions: top and bottom, left and right. How change only bottom direction? Commented May 9, 2018 at 20:50
  • @IvanSokolov set the anchor point y valueto 0. You'll have to adjust the position to make up for this.
    – stib
    Commented Dec 10, 2020 at 2:25
1

Since copying from a youtube video is annoying, here's the expression put in content > transform > anchor point:

box_width = content("Rectangle 1").content("Rectangle Path 1").size[0];
box_height = content("Rectangle 1").content("Rectangle Path 1").size[1];

[box_width/2, box_height/-2]
0

Yeah, it's really annoying that it does that, the shape layer defaults to an anchor point that is centered in the box. The workaround that I use is to use an expression to link the anchor point the box dimensions like this:

AE expressions for rectangle shape

Then I think it will work the way you want it to.

You can use the expression by following the steps below and in this screen capture video.

  1. Option click to enable expressions for the anchor point of the shape layer.
  2. Pickwhip to the box size to get the expression started.
  3. Make some adjustments so the 2 anchor point values are negative one half of the size values.

If anyone knows an easier way to accomplish this, I'd love to learn it.

3
  • Can you share the expression and how to use it? Commented May 11, 2018 at 14:24
  • 1
    Sure, I option click to enable expressions for the anchor point of the shape layer, then pickwhip to the box size to get the expression started, then make some adjustments so the 2 anchor point values are negative one half of the size values. Maybe it would be easier to see how I did it, I made a screen capture video here: youtu.be/ivcrBtQifeY
    – rbd-dc
    Commented May 12, 2018 at 1:28
  • Very helpful! I added that to the answer. Commented May 12, 2018 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.