Scaling units: pixels instead of percent?
by Kirk Smith
on
May 5, 2009 at 11:13:23 am
I have a need to call to the scale attribute of a text layer using an expression. I'm trying to make a versatile setup for some particle effects that will let me change the text layer used without having to edit any numbers. The problem is, when I select the text layer and hit S (for scale) it brings up the scale in percent, I need it in pixels. There has to be a way I can make it let me call the pixels values of each scale, but I can't find it anywhere. Iv'e tried the expression:
thisComp.layer("[my text layer]").height
But that just gives me 720, the height of my comp...not the text layer. The text layer is 33.2276 pixels high and 369.24719 pixels wide. Please, someone help me out!
Re: Scaling units: pixels instead of percent? by Kirk Smith on May 5, 2009 at 9:54:24 pm
@adriano: no, that's not what I wanted. I need to be able to pickwhip the pixel height and width of the text layer into a particle emitter's height and width.
@bartek: I suppose that's what I'll have to do. I tried moving around the anchor point and doing some math. I'd move it to the top left and I'd do something like this:
tX = thisComp.layer("my text layer").position[0];
cX = thisComp.height;
((cX / 2) - tX) * 2
And that would give me close to the height and width of the text, but it wasn't perfect.