I would like to change the scale property of a layer, using an expression control effect applied on it. So basically, I don't want to apply the expression directly on the scale property. I want to apply it on a separate place so that I can easily copy paste the scaling effect on to other layers, without having to individually click on to the scale property of these layers.
So far, I know that I can access the layer property using:
However, when I use:
thisLayer.transform.scale = [50,50];
Can someone please help me. I just want to change the layer's scale property, by applying the expression in the effects area.
Thanks in advance!
You need to spend a little time with expression basics. Type expressions in the Search Help field at the top right corner of AE and study up. You will be amazed what a half hour can do for your understanding.
You have a few options. If you want equal scale values for all parameters you can create a null layer and add an expression slider to the null. Now lock the Expression Control Panel so the effects stay visible.
Now you open one of the layers that you want to control and start an expression by clicking the stopwatch while holding down the Alt/Option key.
Now you type "s =" and then drag the slider to the Expression Control Panel and tag the slider and release.
If you have not renamed anything the expression would look like this so far:
s = thisComp.layer("Null 1").effect("Slider Control")("Slider");
now just add the array:
Now that the expression is created select the scale property and go to the edit menu and select copy expression only.
Now select all the layers you want to control and paste (Ctrl/Cmnd + v) and you're done.