Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions link the position of a layer to a different comp layer..

  • link the position of a layer to a different comp layer..

    Posted by Scott Mccall on November 6, 2008 at 3:24 am
    thisComp.layer("point control").effect("Point Control")("Point")

    How do I link the position of a layer in one comp to the position of another layer in a different comp?

    currently I have this, which works fine since the layer is in the same comp…:

    thisComp.layer(“point control”).effect(“Point Control”)(“Point”)

    this just links the position to a point control layer I have. what i want to do is put the point control in a seperate comp so I can have different layers in various comps linking to the same point control layer..

    I know this is probably a stupid question, hehehe, but I am learning!

    thanks in advance!

    Murat Atasoy replied 10 years, 1 month ago 5 Members · 4 Replies
  • 4 Replies
  • Eric Sanderson

    November 6, 2008 at 3:21 pm

    instead of starting the script with “thisComp”, try starting it with “comp(“name of comp”)”

  • Abie Silva

    April 2, 2015 at 5:50 pm

    This is exactly what I needed to learn for a current project & for many more to come; THANK YOU SO MUCH!!

  • Sabrina Hochmuth

    March 8, 2016 at 10:48 am

    Hello,
    is there a way to to not use a comp name but just reference to the previous comp (the parent in relative path).

    I read referencing to parent is not possible, but is it possible just saying like “one comp above this comp”? (Would be handy in case i rename my “parent comp”).

  • Murat Atasoy

    March 12, 2016 at 11:18 pm

    With this code you link layername to layername2 in the same comp
    app.project.item(1).layer("layername").parent = app.project.item(1).layer("layername2");

    not work for one comp to other comp’s layer to link 😉
    app.project.item(1).layer("first_comp_a_layer").parent = app.project.item(2).layer("second_comp_a_layer");

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