Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions parent one parameter only

  • parent one parameter only

    Posted by Mio Tanaka on January 9, 2012 at 1:07 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.

    Mio Tanaka replied 14 years, 4 months ago 3 Members · 3 Replies
  • 3 Replies
  • Darby Edelen

    January 9, 2012 at 4:18 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

  • Dan Ebberts

    January 9, 2012 at 5:07 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

  • Mio Tanaka

    January 11, 2012 at 9:56 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.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy