i'm currently trying to wrap my head around using the sourceRectAtTime() expression to measure any given text layer (selected using layer control) to create a text box.
The basic functionality works fine, i can create a shape with the exact dimensions. But the positioning of the shape layer doesn't work as expected. I want the shape layer to be dynamic - in the way that i can select any text layer in the comp and make the shape layer have the correct dimensions and positioning to be behind the text layer.
I used the .top and .left output values the position the shape layer, but the values place the layer somewhere else. I managed to find the correct position subtracting the text layers' position from the top/left values - but whenever i change the source text, it's off again.
Is there any way to force the width, height and position of the shape layer to always match the text layer?
Thanks in advance - any help is greatly appreciated