Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Change position of one composition layer inside a composition

  • Change position of one composition layer inside a composition

  • Vaibhav Vohra

    May 9, 2020 at 7:28 pm

    I have just started learning extendscript to create scripts for after effects.

    i want to know if i have created a composition “A” and added 3 compositions in it “E” “F” “G”
    and now i want to change the position of “F” composition only.
    So is there a way i can do that with the name of the layer?
    from index i know it will be done, but from the name of the composition is it possible?

  • Andrei Popa

    May 10, 2020 at 8:05 am

    If composition F is already in composition A, and composition A is open, you can use this:

    app.project.activeItem.layer("F").position.setValue([100,100])

    Andrei
    My Envato portfolio.

  • Vaibhav Vohra

    May 10, 2020 at 10:41 am

    Thanks Andrei Popa.
    Yes composition “F” is already in composition “A” but it is not open.

  • Andrei Popa

    May 10, 2020 at 12:25 pm

    Just replace app.project.activeItem with the variable that holds the composition A.

    Andrei
    My Envato portfolio.

  • Vaibhav Vohra

    May 10, 2020 at 1:45 pm

    Thanks alot.

Viewing 1 - 5 of 5 posts

Log in to reply.

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