Activity › Forums › Adobe After Effects Expressions › Expressions – Question about actual and relative path
-
Expressions – Question about actual and relative path
Posted by Anja Riehl on January 20, 2017 at 12:08 pmHello there,
I am using the expression below, but somehow the way I did it, isn´t working for me.
Is there a way to use relative paths?
Can anyone help? This would make my day 🙂comp("SCENES 1-10").layer("CAM ctrl").transform.yRotation;
C = comp("SCENES 1-10");
L = C.layer("POPUP PAGE 3");
C.layer("CAM ctrl").transform.yRotation.valueAtTime(time+L.startTime)Anja Riehl replied 9 years, 3 months ago 2 Members · 8 Replies -
8 Replies
-
Dan Ebberts
January 20, 2017 at 6:37 pmWhat is it you’re trying to do? The way you have it written, it doesn’t appear that the first line will do anything.
Dan
-
Anja Riehl
January 22, 2017 at 4:10 pmHello, my CAM ctrl layer is connected to the CAM ctrl layer in the main composition. That is what the line is for. What I’ll need is my script with a relative path.
-
Anja Riehl
January 22, 2017 at 6:43 pmLet me explain…
At the moment I am using an expression like that:
L = C.layer(“POPUP PAGE 3”)
With an actual path “POPUP PAGE 3″…is there a way to generalize this?
The “POPUP PAGE 3” composition is part of the Main Composition, so a level above.
Do you need more information?Thank you.
Anja -
Dan Ebberts
January 22, 2017 at 6:50 pmYou could do this:
L = C.layer(thisComp.name)
but you can only reference the main comp by name, if that’s what you’re asking.
Dan
-
Anja Riehl
January 22, 2017 at 7:42 pmOk, this is the expression that I am using. (below)..so I can only change the general path for the second line? Can I work with “_parent”?
C = comp(“SCENES 1-10”);
L = C.layer(“POPUP PAGE 3”);
C.layer(“CAM ctrl”).transform.yRotation.valueAtTime(time+L.startTime)Sorry, for sounding so weird. I am an absolute beginner when it comes to scripting with AE.
It’s such an amazing and complex program.
Thank you so much for your time and help.Anja
-
Dan Ebberts
January 22, 2017 at 8:24 pmThere is no way to access the “parent” comp, except by name.
That’s by design, because a precomp only renders once–you can’t have a precomp render differently based on what parent crop you drop it into.
Dan
Reply to this Discussion! Login or Sign Up