Copy link to clipboard
Copied
I've used these expressions before with no trouble but clearly something is different this time. I've tried adding it to all the different Scale and Size properties within the Box layer but they all either extend left to right forever or they scale wrong. Either it's growing too fast, or it shrinks as I type. Can anyone spot what is causing this?
  
It looks like your x scale for the layer is set to -4674.3. Maybe that's the issue?
Yes I think that had something to do with it. I created a new rectangle from scratch and was able to get it to work by changing the value in parenthesis of the expression for sourceRectTime to 2 so it didn't get thrown off by the animation at the beginning. And the new text box doesn't have such an extreme x value. Initially, I tried a new approach which created groups within the layer and I think that got messed up.
Copy link to clipboard
Copied
Also, should have maybe added the expressions I used-
s=thisComp.layer("Your Text Title Name Here");
w=s.sourceRectAtTime().width;
h=s.sourceRectAtTime().height;
[w,h]
Also tried -
dname=thisComp.layer("name").sourceRectAtTime(time).width;
Value+[dname,0]
Copy link to clipboard
Copied
Have you tried applying the expression to rectangle path's Size property?
Copy link to clipboard
Copied
Yes. Something is throwing it off. I'm wondering if it has to do with the animation I added.
Copy link to clipboard
Copied
This is another attempt, this should be the size of my text but this is what I get.
Copy link to clipboard
Copied
A slightly different expression creates an infinite width
Copy link to clipboard
Copied
In your other posts, it looks like you have adjusted the scale values of both the box's group and layer transforms. Is that still the case?
Copy link to clipboard
Copied
Here are the current values
Copy link to clipboard
Copied
It looks like your x scale for the layer is set to -4674.3. Maybe that's the issue?
Copy link to clipboard
Copied
Yes I think that had something to do with it. I created a new rectangle from scratch and was able to get it to work by changing the value in parenthesis of the expression for sourceRectTime to 2 so it didn't get thrown off by the animation at the beginning. And the new text box doesn't have such an extreme x value. Initially, I tried a new approach which created groups within the layer and I think that got messed up.