ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How do I resize a shape's path when I click/drag, instead of "transforming" the shape?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sam Petschulat
How do I resize a shape's path when I click/drag, instead of "transforming" the shape?
on Mar 11, 2016 at 7:09:36 pm

I'm trying to edit the size of a shape. When I click and drag the corners of the rounded rectangle, I can change the size, but behind the scenes this is changing the "Transform" settings of the rounded rectangle. This is a problem because this distorts my rounded rectangle's rounded corners. Is there a way to click and drag the corners and edit my rounded rectangle's "Path" parameters, instead of editing the rounded rectangle's "Transform" parameters? I know that I can edit the rounded rectangle's Path by changing the Path's values, but doing it that way is more cumbersome and slow. I want to be able to just click and drag the shape and change the Path settings. Is this possible?

- sam p


Return to posts index

Kevin Camp
Re: How do I resize a shape's path when I click/drag, instead of "transforming" the shape?
on Mar 11, 2016 at 9:44:08 pm

the only way i can think of would be to link the rectangle size property to the scale of a dummy layer. the dummy would need to be the same initial size as the visible rectangle (preferably be a duplicate) but turn off the fill and stroke properties for the dummy.

both shapes would probably also need to have the anchor point in the center (layer>transform>center anchor point in layer).

if that would work for you, you could try this expression in the visible shape layer's 'size' property:
dummy = thisComp.layer("Dummy Rectangle");
s = dummy.transform.scale;
w = value[0] * s[0] / 100;
h = value[1] * s[1] / 100;
[w, h]


just change the name of "Dummy Rectangle" to the name of your dummy shape layer and when you drag the scale of the dummy, it should effect the visible shapes 'size' property and not skew or otherwise scale the rounding.

if you were modifying other draggable properties of the dummy shape (like position) you could link those with a simple expression-pickwhip between the layers' like properties.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Sam Petschulat
Re: How do I resize a shape's path when I click/drag, instead of "transforming" the shape?
on Mar 14, 2016 at 3:52:37 pm

thanks for the tip! i haven't tested it myself because for this project it seems best and easiest to just manipulate my rounded rectangle's size parameters. appreciate the advice though i may use this in the future.

- sam p


Return to posts index


Dave LaRonde
Re: How do I resize a shape's path when I click/drag, instead of "transforming" the shape?
on Mar 11, 2016 at 10:43:03 pm

Just curious -- wouldn't changing the layer's scale do the trick? Shape layers are vectors, right?

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Kevin Camp
Re: How do I resize a shape's path when I click/drag, instead of "transforming" the shape?
on Mar 11, 2016 at 11:08:05 pm

since he has rounded corners, the rounded get scaled too (the radius does not stay the same). and if he is saying the rounded rectangle horizontally or vertically, the rounded corner get distorted. i assume he wants those corners to stay constant, but manipulate the size of the rectangle.

i think this is how most users would expect it to work (who wants rounded cover that get wonky just because you drag the width or height), but it's not highest on my list of things to fix in ae right now.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]