Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Position of control null in parent comp

  • Position of control null in parent comp

    Posted by Lloyd Alvarez on April 21, 2011 at 4:41 pm

    You would think I would understand this stuff by now but it still does my head in.

    I have a parent comp “Main” that has a control null “Control Null”. In a nested pre-comp that has been scaled in the parent comp I have a text layer “Text” that I would like to be able to control it’s transform properties with the control null in the parent comp but no matter what combo of toWorld, etc I try I can’t get it to work. Any help would be much appreciated.

    Lloyd Alvarez replied 15 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 21, 2011 at 5:39 pm

    Lloyd,

    It can get complicated. You need to do it in two steps. Say you have have a Point Control on your null that you want to use to control the position of the text in the sub-comp. First you need to get the Position Control into the main comp’s world space. Then you need to translate that result to the layer space of the sub-comp as a layer in the main comp. Like this:

    L1 = comp(“Main”).layer(“Control Null”);
    ptCtrl = L1.effect(“Point Control”)(“Point”);
    p = L1.toWorld(ptCtrl);
    L2 = comp(“Main”).layer(thisComp.name);
    L2.fromWorld(p);

    The details may differ, depending on exactly what you’re trying to do.

    Dan

  • Lloyd Alvarez

    April 21, 2011 at 5:59 pm

    That did the trick, thanks Dan. I was failing to consider the pre-comp’s transforms in the parent comp.

    Cheers,
    Lloyd

    https://aescripts.com

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