Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects effect controls – slider parameters – 7 values, slider jumps directly from 0 to 1

  • effect controls – slider parameters – 7 values, slider jumps directly from 0 to 1

    Posted by Jadwiga Kowalska on March 16, 2012 at 2:04 pm

    hi

    is there a way to edit the effect controls slider parameters, so that I have just 7 values? (I’m using the slider control to animate mouth shapes from a character, which are time remapped, and the time remapping is linked to the slider control) When I edit the slider parameters, I can adjust that the range is from 0-7, but if I use the slider it’s going through 0.01, 0.02, 0.03… etc. It would be nice when the slider would jump directly from 0 to 1 to 2 to 3 etc.

    Thanks
    jadwiga

    Jadwiga Kowalska replied 14 years, 6 months ago 2 Members · 4 Replies
  • 4 Replies
  • Walter Soyka

    March 16, 2012 at 4:26 pm

    [Jadwiga Kowalska] “When I edit the slider parameters, I can adjust that the range is from 0-7, but if I use the slider it’s going through 0.01, 0.02, 0.03… etc. It would be nice when the slider would jump directly from 0 to 1 to 2 to 3 etc.”

    Alt-click on the slider’s stopwatch icon, and paste the following expression:
    Math.floor(value)
    This will truncate any decimal values, always leaving the slider with a rounded-down whole number.

    I’d recommend using hold keyframes [link] where appropriate, for more control.

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Jadwiga Kowalska

    March 16, 2012 at 4:50 pm

    the Math.floor(value) works when I add it – but what else do I need to write in the expression, so that it keeps my range from 0-7 and doesn’t jump to >-1 or 8<?

    thank you!
    jadwiga

  • Walter Soyka

    March 16, 2012 at 5:07 pm

    [Jadwiga Kowalska] “the Math.floor(value) works when I add it – but what else do I need to write in the expression, so that it keeps my range from 0-7 and doesn’t jump to >-1 or 8<?”

    x = Math.floor(value);
    if (x > 7) x = 7
    else if (x < 0) x = 0;
    x;

    This will limit the returned value to whole numbers between 0 and 7, inclusive.

    The true value of the slider itself can actually be much larger or smaller (it ranges from -1,000,000 to +1,000,000), and it can be fractional — as you’ll see when you scrub it — but it will only ever return a whole value from 0 to 7 when evaluated for other expressions like time-remapping.

    Walter Soyka
    Principal & Designer at Keen Live
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    RenderBreak Blog – What I’m thinking when my workstation’s thinking
    Creative Cow Forum Host: Live & Stage Events

  • Jadwiga Kowalska

    March 16, 2012 at 5:17 pm

    great! Thanks a lot!
    works perfectly!

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