This is where Expression Controls come in handy!
Learn all about these useful helpers in this YouTube video! Enjoy
There are a number of expression controls that you can find in the Effects and Presets window in Adobe After Effects. These controls include
Expression Controls are simple controls that do nothing at all by themselves. They are merely containers for a value of a certain type (continuous, on/off, angle, colour, etc) that you can change and keyframe.However, you can link up the value of a slider to the opacity of 20 layers and then, by animating the value of a single slider control, you can change the opacity of all those 20 layers simultaneously - that is the power of Expression Controls
To link the value of an Expression Control to any effect parameter on any other layer, alt-click on the stopwatch icon next to the effect parameter you want to link. This will enable the expression for the parameter. An expression (as opposed to an Expression Control) is a simple code expression that tells After Effects how to calculate the value for this parameter.
But you don't need worry about that now! All you have to do is to click and drag the pickwhip icon from the effect onto the value of your Expression Control. This will automatically create the correct expression that tells After Effects to derive the value for this parameter from the value of the expression control
In the above example I am linking the Transition Completion parameters of a number of layers to a single slider Expression Control.If you then animate the value of the slider, you will automatically animate the value of all the linked effect parameters.
The only thing to watch out for is that the parameter you want to link matches the type of the expression control. For example, you cannot link an angle to a checkbox or a colour to a slider.
Warning, code ahead!When you link an effect parameter to an Expression Control with the pickwhip tool, After Effects will automatically create the expression to retrieve the correct value for you.
If you have a layer called 'CONTROL' with a Slider Control effect called 'Slider Control' attached to it and you link to this Expression Control, the expression created for you will probably be
Here is a breakdown of the individual elements of this expression
thisComp - specify that we are accessing the current open compositoin. - the dot '.' accesses a property. In this case
.layer accesses the 'layer' property of 'thisComp'("CONTROL") - from the layer property it finds the layer called 'CONTROL'
.effect - select from the effects on the CONTROL layer("Slider Control") - Select the effect called 'Slider Control' from the layer
("Slider") - From the Slider Control effect, select the value called 'Slider'