Page 1 of 1

Using the size of a text layer to connect a ramp

Posted: June 24th, 2008, 4:15 pm
by Disciple
I'm trying to do something simple : I want to attach a ramp effect to a text layer but have the start of the ramp be at the anchor point of the text layer (by default lower left) and the end to be at the same x value as the start, but to have as y value the height of the text layer.
If I pickwhip the start of the ramp to the anchor point it goes all the way to 0.0 for the comp. And if I then put this expression in the end of the ramp

Code: Select all

effect("Ramp")("Start of Ramp")+height;
I get the end point at 0 in Y and 720 in X.

Can expressions read the size of a text layer natively?

Thanks
Alex

Re: Using the size of a text layer to connect a ramp

Posted: June 26th, 2008, 2:27 am
by Mylenium
No, they can't. You have to use sampleImage() or some other workaround to find the layers border pixels.

Mylenium

Re: Using the size of a text layer to connect a ramp

Posted: June 27th, 2008, 8:33 am
by lloydalvarez
yep, long standing bug... text layers don't report back their true size.. if you search there's a thread here that talks all about it and the workarounds..

-Lloyd