ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

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

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Cabestany
Link position to a layer on a different comp, getting the wrong value
on Mar 16, 2017 at 11:05:23 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 1920x1080 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


Return to posts index

Dan Ebberts
Re: Link position to a layer on a different comp, getting the wrong value
on Mar 17, 2017 at 12:47:55 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



Return to posts index

Emre Anil
Re: Link position to a layer on a different comp, getting the wrong value
on Mar 20, 2017 at 9:10: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)


Return to posts index


David Cabestany
Re: Link position to a layer on a different comp, getting the wrong value
on Mar 27, 2017 at 6:41:58 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.


Return to posts index

Dan Ebberts
Re: Link position to a layer on a different comp, getting the wrong value
on Mar 27, 2017 at 7:51:41 pm

Can you post a simple project demonstrating the issue?

Dan



Return to posts index

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