negative to positive value
Posted: May 27th, 2013, 11:20 am
This one should be very easy but my knowledge on expression scripts is very limited so I call for help.
A camera lens blur effects' blur radius is linked to a slider control and I would like it to turn the value up according to the sliders negative AND positive values, so:
Slider 50 = Blur radius 50
Slider 0 = Blur radius 0
Slider -50 = Blur radius 50
I wrote following nonsense in the blur radius attribute which obviously doesn't work
A camera lens blur effects' blur radius is linked to a slider control and I would like it to turn the value up according to the sliders negative AND positive values, so:
Slider 50 = Blur radius 50
Slider 0 = Blur radius 0
Slider -50 = Blur radius 50
I wrote following nonsense in the blur radius attribute which obviously doesn't work
Code: Select all
x= (thisComp.layer("Adjustment Layer 3").effect("Slider Control")("Slider"))
if (x < 0) {*-1;
}