-
Problem when using SourceRectAtTime expression
Hi, I am using the SourceRectAtTime() Expression sample from ECAbrams to have a rectangle shape layer resizes itself according to a text layer’s height and width. It’s working nicely.
s=thisComp.layer("HELLO");
x=s.sourceRectAtTime(time-s.inPoint,true).width;
y=s.sourceRectAtTime(time-s.inPoint,true).height;
[x,y]Then I realized the “timing” is based on the layer time but not the comp time (which is solved by using time-inPoint)
But after that, I also realized SourceRectAtTime starts counting from the “initial starting point” of the text layer, which means when I extend or reduce the text layer’s starting point, the inPoint is looking at the altered starting point, but the SourceRectAtTime is looking at the initial starting point of the text layer. That makes the timing “off”
So I am thinking if there’s anything that can replace time-inPoint, so we can get the “initial starting point” which matches the SourceRectAtTime. But no luck yet…
Any help on this will be greatly appreciated!
