Using the size of a text layer to connect a ramp

Moderators: Disciple, zlovatt

Post Reply
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

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
Mylenium
Posts: 139
Joined: July 20th, 2005, 12:07 am

No, they can't. You have to use sampleImage() or some other workaround to find the layers border pixels.

Mylenium
[Pour Mylène, ange sur terre]
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
Post Reply