Participating Frequently
July 12, 2023
質問
How to make a shape layer responsively adapt to the length of two different text layers?
- July 12, 2023
- 返信数 2.
- 1688 ビュー
I am working on creating a dynamic lower third, where the shape layer container grows/shrinks automatically, based on the length of the type inside. Currently I'm using the expression below, so the shape layer (L3 Box) is affected by the text layer (Artist Name). This is currently working just fine. That said, I also have a second text layer (Artist Title), that I want the box to respond to as well. For instance, if the Artist Title ends up being longer than the Artist Name, the box won't be big enough. How would I update or change my expression so it listens to both text layers?
s=thisComp.layer("Artist Name")
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height;
[w,h]
