Expression Copied to Clipboard! πŸ—‚
← Back to Expressions

Max Width Scale of Text Layer - After Effects Expression

Constrain the max width of a text layer using the scale property

Max Width Scale of Text Layer

maxW = effect("max-width")("Slider"); // pick whip to your slider
sourceW = sourceRectAtTime(time,true).width;

if(sourceW >= maxW ){
s = value[0]*maxW/sourceW;
[s,s]
} else {
value
}

‍

Copied to Clipboard!
maxW = effect("max-width")("Slider");
sourceW = sourceRectAtTime(time,true).width; if(sourceW >= maxW ){ s = value[0]*maxW/sourceW;
[s,s]
} else { value
}

Apply expression to the Scale property to keep a text layer from scaling beyond a certain value. Link maxW to a Slider Control for maximum control.

More expressions you might like...

Credit