Activity › Forums › Adobe After Effects Expressions › scale expression ratio
-
scale expression ratio
Posted by John Crump on September 27, 2021 at 6:31 pmI 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
John Crump replied 4 years, 7 months ago 3 Members · 6 Replies -
6 Replies
-
Dan Ebberts
September 27, 2021 at 6:56 pmUnless I’m missing something, I think it would just be:
thisComp.layer("parent").scale*0.75 -
Brendon Murphy
September 27, 2021 at 6:56 pmPick 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 pmThanks 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 pmAssuming 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 pmoo 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 pmNevermind! I got it to work. Dan you are a legend. Love everything you do for the MD community, thank you.
Reply to this Discussion! Login or Sign Up