FORUMS: list search recent posts

parent one parameter only

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mio Tanaka
parent one parameter only
on Jan 9, 2012 at 1:07:44 pm

I had to make a map which scales down with a point (shape layer) and a text (text layer, place name).
So I made a null object and parented the others.
But I didn't want the point and the text to scale down,
so I added a simple expression to their scale property.
[100, 100]
But they still scaled down.
I tried googling how to convert a layer's position to a shape layer's position and whatnot,
but I had no luck. (I have only basic knowledge of expressions.)
So I manually scaled them up with keyframes as the null and the map did the opposite.
But it looked a bit awkward so I edited the graph.
It looked better but still not perfect and I was not completely happy.

I believe there's a solution for this problem (either using expression or not)
Does anyone know how to get around this?

Thanks in advance.


Return to posts index

Darby Edelen
Re: parent one parameter only
on Jan 9, 2012 at 4:18:22 pm

Try parenting a Null to the map layer, then use this expression on the Point and Text layer positions properties:

l = thisComp.layer("Null 1");
l.toComp(l.anchorPoint);


This assumes that the Null is titled "Null 1." You can move the Null around relative to the map if need be. Also adjust the anchor points of the Point and Text layers to make sure they're positioned as you want over the Null location.

Darby Edelen


Return to posts index

Mio Tanaka
Re: parent one parameter only
on Jan 11, 2012 at 9:56:31 am

Thank you, Darby and Dan, for the expressions.
Both worked perfectly and did what I wanted.
And I'll look into the methods you two used and learn about it.


Return to posts index


Dan Ebberts
Re: parent one parameter only
on Jan 9, 2012 at 5:07:09 pm

This should let a layer keep its own scale, no matter what happens to its parent, grandparent, etc.


L = thisLayer;
s = transform.scale.value;
while (L.hasParent){
L = L.parent;
for (i = 0; i < s.length; i++)
s[i] *= 100/L.transform.scale.value[i];
}
s




Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]