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 pmI 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 amIf 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 amThanks Andrei Popa.
Yes composition “F” is already in composition “A” but it is not open.Andrei Popa
May 10, 2020 at 12:25 pmJust replace app.project.activeItem with the variable that holds the composition A.
Andrei
My Envato portfolio.Vaibhav Vohra
May 10, 2020 at 1:45 pmThanks alot.
Log in to reply.