Auto Adjust Shape Layer Size Based on Text in After Effects
Learn how to auto adjust shape layer size based on text in after effects.
In this quick After Effects tutorial, learn how to set up your shape layers to automatically adjust and re-size based on the your text.
//size
margin = 50;
w = (thisComp.layer("TEXT").sourceRectAtTime().width)+margin*2;
h = (thisComp.layer("TEXT").sourceRectAtTime().height)+margin*2; [w, h]
//left text position
content("Rectangle 1").content("Rectangle Path 1").size/2
//right text position
content("Rectangle 1").content("Rectangle Path 1").size/-2