Ok, I’ve been playing with these expressions for hours and it works great but in certain conditions.
Maybe I’ve started things the wrong way. The problem is the corner pin effect I think. When I want to add round corners to my shape layer in my precomposition, the corner pin effect will of course stretch it all and it looks pretty bad especially when I write long titles.
I managed to do the scripting again on a shape layer, directly in my main composition. I’m using a rectangle shape.
Here is a screenshot
0_creativecow3.jpg
It works but only on 1 line. And that’s because unlike the corner pin effect, I can’t have the coordinates of my shape layer points and lock the top points while the bottom points could still move vertically.
I do not wish to take any more of your time but do you think there is a solution for this ?
//Text layer/sourceText
if (time < -1) "E" else
if (time < 0) "É" else value
//Shape layer/Content/Rectangle 1/Rectangle Path/Size
L = thisComp.layer(1);
r1 = L.sourceRectAtTime(-1,false);
r2 = L.sourceRectAtTime(time,false);
[r2.width,r1.height]
//Shape layer/Content/Rectangle 1/Rectangle Path/Position
content("Rectangle 1").content("Tracé rectangulaire 1").size/2;