View all expressions
Transformation

Dynamic Text Box

Dynamically adjusts the size of a text box based on the width and height of another text layer, adding padding.

Shape layer size property

subText = thisComp.layer("index-1");
textWidth = subText.sourceRectAtTime(time).width + 100;
textHeight = subText.sourceRectAtTime(time).height + 100;
[textWidth, textHeight]

Text layer anchor point

top = sourceRectAtTime().top;
left = sourceRectAtTime().left;
x = left + (sourceRectAtTime().width/2);
y = top + (sourceRectAtTime().height/2);
[x,y]
Dynamic Text Box

Practical use case

Dynamically adjusts the size of a text box based on the width and height of another text layer, adding padding.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image