Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link position to a layer on a different comp, getting the wrong value

  • Link position to a layer on a different comp, getting the wrong value

    Posted by David Cabestany on March 16, 2017 at 11:05 pm

    I have two text layers, each on a separate comp. I tried linking their positions using an expression so when I move one the other gets updated automatically. I have no animation in neither layer, no keyframes at all. The expression I used is super basic, yet the values I’m getting in return are completely off. The position in the source layer is [960, 595.1] but the layer that has the expression is getting [260, 87].

    Both layers are 1920×1080 with square pixels, in fact I duplicated one of the comps to make the second one, they should match.

    Any help with this is greatly appreciated.

    D.

    comp("innocent").layer("innocent").transform.position

    Dan Ebberts replied 9 years, 1 month ago 3 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    March 17, 2017 at 12:47 am

    I’m not seeing that behavior. The comps don’t have the same name, do they (or have the same name as another comp in the project)?

    Dan

  • Emre Anil

    March 20, 2017 at 9:10 am

    Does the target layer have a parent?
    If that’s the case try changing your expression to this:

    toWorld(comp("innocent").layer("innocent").transform.position)

  • David Cabestany

    March 27, 2017 at 6:41 pm

    Hey guys, so sorry I didn’t reply earlier to this thread. It sort of fell through the cracks on my end.
    The answer is no, there is no other comps sharing the name, nor the layers are parented to anything, they are the only layer inside each comp.

    Thanks,
    D.

  • Dan Ebberts

    March 27, 2017 at 7:51 pm

    Can you post a simple project demonstrating the issue?

    Dan

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