ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Change position of one composition layer inside a composition

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Vaibhav Vohra
Change position of one composition layer inside a composition
on May 9, 2020 at 7:28:54 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?


Return to posts index

Andrei Popa
Re: Change position of one composition layer inside a composition
on May 10, 2020 at 8:05:37 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.


Return to posts index

Vaibhav Vohra
Re: Change position of one composition layer inside a composition
on May 10, 2020 at 10:41:42 am

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


Return to posts index


Andrei Popa
Re: Change position of one composition layer inside a composition
on May 10, 2020 at 12:25:24 pm

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

Andrei
My Envato portfolio.


Return to posts index

Vaibhav Vohra
Re: Change position of one composition layer inside a composition
on May 10, 2020 at 1:45:57 pm

Thanks alot.


Return to posts index

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