FORUMS: list search recent posts

F-Stop value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Richard Farkas
F-Stop value
on Jun 16, 2012 at 10:47:15 am


I tried to create a preset that shows an F-Stop number in the corner. The F-Stop number is shown by a text layer, and source text is controlled by a slider control. I created an expression (see below), that partly works, but I think it’s too complicate. I used 10 F-Stop values: F1, F1.4, F2.8, F4, F5.6, F8, F11, F16, F22 and CLOSE. My goal is: if the slider value is equal or more than 0 but less than 10, the F-Stop value is F1. If equal or more than 10, but less than 20, in this case the text shows F1.4, ect.

Could anybody give some advice?



My expression:

n=effect("Slider Control")("Slider");
} else if(n==1){
} else if(n==2){
} else if(n==3){
} else if(n==4){
} else if(n==5){
} else if(n==6){
} else if(n==7){
} else if(n==8){
} else if(n==9){
} else {

Return to posts index

Dan Ebberts
Re: F-Stop value
on Jun 16, 2012 at 4:24:34 pm

I'd do it like this:

n=effect("Slider Control")("Slider");
fStops = ["F1","F1.4","F2","F2.8","F4","F5.6","F8","F11","F16","F22","CLOSE"];


Return to posts index

Richard Farkas
Re: F-Stop value
on Jun 19, 2012 at 11:18:46 am

Thanks Dan, it works perfectly!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved