Scale layer to Comp size After Effects expression preset

I’d like to share this (useless?) expression based preset that is really simple (stupid?) but involve some line of (boring!) coding. Automatically scale layer to comp size in After Effects by fit, fill and fill maintaining original aspect ratio. Hope that you’ll find it useful. And if you want to share improvements, you’re more than welcome.

I don’t remember why I developed it, but I think that can be useful in some circumstances where you have to experiment and test with comp size. Or maybe you can use it just for fun or for learning purpose.

It has 4 Checkboxes – Scale to Fit Maintaining Aspect Ratio, Scale to Fill, Original Size, Bypass – for 5 combinations of use:

Combo 1, Scale the layer to fit the comp size (obviously it maintain the original aspect ratio of the layer):
Scale layer to Comp size After Effects expression preset

Combo 2, Scale the layer to fill the comp size stretching it (so it’s not maintaining the aspect ratio of the layer):
Scale-to-Comp-Scale-to-fill
Combo 3, Scale the layer to fill the comp size (it maintain the original aspect ratio of the layer):
Scale-to-Comp-Scale-to-fill-maintaining-ratio
Combo 4, restore the original size of the layer:
Scale-to-Comp-restore-original-size
Combo 5, bypass the entire presets (it restore the scale value defined in the layer properties if you have modified it):
Scale-to-Comp-Bypass
or
Scale-to-Comp-Bypass-2
After the explanation it might appear complicated but actually it’s not. Check it by yourself.

Download Preset*

 

*By using davidbenedetti.it, you automatically agree and accept this website terms and conditions in full.