Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions scale expression ratio

  • scale expression ratio

  • John Crump

    September 27, 2021 at 6:31 pm

    I want to use a scale expression so that when I scale one object, the linked object will scale up 75% of the parent. So for example, one object will go from 0% to 100% the linked object will scale from 0% to 75%. I want the ability to adjust the scale to any number and the linked object will only adjust it’s scale 75% of that amount. Any help would be great! Thank you

  • Dan Ebberts

    September 27, 2021 at 6:56 pm

    Unless I’m missing something, I think it would just be:

    thisComp.layer("parent").scale*0.75
  • Brendon Murphy

    September 27, 2021 at 6:56 pm

    Pick whip the “linked object’s” scale to the scale of the driver object. Add this to the end of the expression field: *.75

  • John Crump

    September 27, 2021 at 9:27 pm

    Thanks for the reply Dan, I originally tried that as well. The part I can’t figure out is that I need both objects to start at the same size, say 200×200. The parent object scales up to 400×400 and the child object should only grow 75% of that, which is 350×350. As soon as I link everything together, the object that has the scale expression applied, shrinks down because it’s scale is now 75%. So if I rescale that object so that it starts at the same size, and scale the parent object, both objects stay the same size. Or if I attach the child object to the null with the expression, AFTER applying the expression, I have the same result. I will attach a file to show you what’s happening. I really appreciate the help

  • Dan Ebberts

    September 27, 2021 at 10:09 pm

    Assuming that the scale of the parent is animated (via keyframes or expression), something like this could work:

    s = thisComp.layer("parent").scale;

    s.valueAtTime(0) + (s - s.valueAtTime(0))*0.75;

  • John Crump

    September 27, 2021 at 10:36 pm

    oo interesting, Thank you Dan. It will be animated, however I’m not quite sure how to plug this into the layer and get it to work, do you have any suggestions on that?

  • John Crump

    September 27, 2021 at 10:43 pm

    Nevermind! I got it to work. Dan you are a legend. Love everything you do for the MD community, thank you.

Viewing 1 - 7 of 7 posts

Log in to reply.

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