Adobe After Effects Expressions Forum
parenting scale problem
parenting scale problem
by aniello ferrone on Oct 8, 2019 at 4:44:23 pm

Hi, could you help me?
I have a text layer parented to a shape layer with the pick-whip tool. I want the text layer to follow the shape layer in everything but no for the scale. How can I do it? The layer are both 2D

Thx in advance
Aniello


Re: parenting scale problem
by Alex Printz on Oct 8, 2019 at 4:56:22 pm

Try this

p = thisLayer;
s = [1,1];
while (true){
if( ! p.hasParent) break;
p = p.parent;
for(i=0;i<p.scale.value.length;i++) s[i] *= p.scale[i]/100;
}
for(i=0;i<p.scale.value.length;i++) s[i] = value[i] / s[i];
s


Alex Printz
Mograph Designer





© CreativeCOW.net