Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Scale of a layer linked to the Circle Size of a shape layer

  • Scale of a layer linked to the Circle Size of a shape layer

    Posted by Sandro Maia on January 25, 2025 at 6:33 pm

    Hello everyone,

    It’s pretty much as my title says, Is there an expression that can link the scale of a layer to the size of a Circle Path layer so when I increase the size of the Circle Path in the shape layer the other layer scales proportionally.

    is this possible?

    I managed to somehow link them, but they are not exact it not scaling proportionally. And i need them to be exact.

    Thank you.

    Sandro Maia replied 3 weeks, 1 day ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    January 25, 2025 at 6:49 pm

    Depending on how you have things set up, I think you’d need a reference size to compare the current size to. Then you could use something like this:

    refSize = 100;
    size = thisComp.layer("Shape Layer 1").content("Ellipse 1").content("Ellipse Path 1").size[0];
    s = (size/refSize)*100;
    [s,s]
  • Sandro Maia

    January 25, 2025 at 9:07 pm

    Dan, as always you are genius.

    Is there also a way to maintain de stroke Width of the circle as the values of the circle size path increases? so everything goes up proportionally ?

  • Dan Ebberts

    January 25, 2025 at 10:18 pm

    You could do something similar with the circle’s Stroke Width:

    refSize = 100;
    size = content("Ellipse 1").content("Ellipse Path 1").size[0];
    value*size/refSize
  • Sandro Maia

    January 26, 2025 at 2:46 pm

    Hi Dan,

    Thanks again, everything is working perfectly!

    I have one more question that might be a bit of a stretch: would it be possible for the red dots layer to scale up not just when the circle size changes, but also proportionally when the stroke width is adjusted?

    I’ve attached a screenshot for reference, and I’ve also uploaded the AE project if that makes it easier to understand.

    The red dots layer is a vector file, and I’d like it to dynamically align along the outer edge of the stroke, no matter how the circle size or stroke width changes. Ideally, the dots should stay perfectly aligned to the outer edge of the stroke.

    Lastly, if it’s possible to add a controller for adjusting the stroke width directly, that would be perfect!

    Thanks again for your help. I really appreciate it!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy