Copy link to clipboard
Copied
Hi guys
How to connect shape layer's transform scale property to text soureRectAtTime to dynamically adjust with new text entry..
Note :
Not with size of shapelayer ..
I want to use transform scale only ..
Thank you
Try this:
margin = 10;
txt = thisComp.layer("text");
r1 = txt.sourceRectAtTime(time,false);
r2 = sourceRectAtTime(time,false);
s = ((r1.width + 2*margin)/r2.width)*100;
[s,value[1]]
Dan
Copy link to clipboard
Copied
Try this:
margin = 10;
txt = thisComp.layer("text");
r1 = txt.sourceRectAtTime(time,false);
r2 = sourceRectAtTime(time,false);
s = ((r1.width + 2*margin)/r2.width)*100;
[s,value[1]]
Dan
Copy link to clipboard
Copied
Thanks Dan !
Although it's not perfectly scaling with text. I think I know that's the issue with anchor point position.
Let me check it tomorrow.