Have been looking around over here, but just can't seem to find a satisfying code for the following:
I am trying some multiple camera editing in After Effects. The idea is to load in footage of three different camera angles in one compostion. The opacity of the layers is then parented to one adjustment layer's slider control.
What I want to achieve is that when the value of the slider is 1, the first layer is visible. When it then crosses over to 2, the second camera angle footage will gradualy become visible. And so on for the next.
I've found some code that makes it possible to switch between zero and 100, but is it also possible to gradually make this transition...?
I think the simplest way would be to use something like this:
s = thisComp.layer("controls").effect("Slider Control")("Slider");
so layer 1 disappears as the slider goes from 1 to 2 (so it would be 50% visible at 1.5), layer 2 disappears as it goes from 2 to 3, etc.
The (much more complicated) alternative would be to have the slider value trigger an opacity animation when the slider reaches the layer's index number, if the simple version above doesn't meet your needs for some reason.