Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Slider Value Ratio

  • Slider Value Ratio

    Posted by Tudor Baican on November 19, 2022 at 8:01 pm

    Hello friends,

    I have in my setup two value sliders. One for the width and one for the height.

    With a checkbox I want to lock the ratio of the sliders.

    Then I just want to use the width slider to scale the height in the same ratio.

    I thing is easy but I don’t get it 😤

    var ratio = effect(‘Slider Width’)(‘slider’)/effect(‘Slider Height’)(‘slider’);

    effect(‘Checkbox Control’)(‘Checkbox’)==true ? effect(‘Slider Width’)(‘slider’)*ratio : value;

    Tudor Baican replied 10 months, 1 week ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    November 19, 2022 at 8:21 pm

    I’m assuming this expression would be applied to the height slider, is that correct? If so, then I think your ratio is backwards (should be height/width) but I don’t think it will work because both sides of your conditional calculate out to the same value (which is the current value of the height slider).

  • Tudor Baican

    November 19, 2022 at 8:33 pm

    Yes, it’s not woking. I use the height value to calculate the ratio and then it will changed in the next line at the same time. 😐

  • Dan Ebberts

    November 19, 2022 at 9:10 pm

    You might want to add a ratio slider that would get used when the checkbox is on.

  • Tudor Baican

    November 20, 2022 at 4:31 pm

    yes, had also this idea. But I use now a scale slider as multiplier, this works better.

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