This should be a simple one. Can't find the direct solution. Playing around with motion. I want to make a lower third which I can use for a client. The rectangle shape I use should be adjustable cause not all names have the same length. If I publish the position or scale the whole rectangle changes. How can I resize the shape only to the right in FCP when the title is shorter or longer?
Another method that will always adjust the rectangle to exactly wherever you place the text would be:
To your Rectangle:
Add Behaviors > Basic > Align To and drag the Text object into the Object well.
Set Align Rectangle to: Left and the To 'Text Object': Left. Set the Offset > X parameter for whatever padding you want. (You may want to publish this parameter).
Go to Rectangle > Geometry > Size and dial down the disclosure triangle.
Right click on Width and Add Parameter Behavior > Link.
Drag the Text Object into the Source Object well.
Set the Source Parameter: click on Compatible Parameters and select Object Attributes > Size > Width.
Set the X Offset to whatever padding you want on the right side of your text. (You may want to publish this parameter as well.)
To make this effect "multiline", do the same (add Link behavior) for Rectangle > Geometry > Size > Height.
Now, no matter where you drag the text on the screen, the backing rectangle will follow and always align the same as well as automatically adjust its size to whatever width (and height) the text is.