ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jadwiga Kowalskaeffect controls - slider parameters - 7 values, slider jumps directly from 0 to 1
by on Mar 16, 2012 at 2:04:54 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


Return to posts index

Walter SoykaRe: effect controls - slider parameters - 7 values, slider jumps directly from 0 to 1
by on Mar 16, 2012 at 4:26:27 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


Return to posts index

Jadwiga KowalskaRe: effect controls - slider parameters - 7 values, slider jumps directly from 0 to 1
by on Mar 16, 2012 at 4:50:38 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


Return to posts index


Walter SoykaRe: effect controls - slider parameters - 7 values, slider jumps directly from 0 to 1
by on Mar 16, 2012 at 5:07:54 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


Return to posts index

Jadwiga KowalskaRe: effect controls - slider parameters - 7 values, slider jumps directly from 0 to 1
by on Mar 16, 2012 at 5:17:29 pm

great! Thanks a lot!
works perfectly!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]