ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expressions - Question about actual and relative path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Anja Riehl
Expressions - Question about actual and relative path
on Jan 20, 2017 at 12:08:55 pm
Last Edited By Anja Riehl on Jan 20, 2017 at 12:20:41 pm

Hello 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)


Return to posts index

Dan Ebberts
Re: Expressions - Question about actual and relative path
on Jan 20, 2017 at 6:37:14 pm

What 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



Return to posts index

Anja Riehl
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 4:10:27 pm

Hello, 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.


Return to posts index


Dan Ebberts
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 6:21:53 pm

Sorry, I don't know what you mean by "relative path".

Dan



Return to posts index

Anja Riehl
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 6:43:35 pm

Let 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


Return to posts index

Dan Ebberts
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 6:50:44 pm

You 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



Return to posts index


Anja Riehl
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 7:42:33 pm

Ok, 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


Return to posts index

Dan Ebberts
Re: Expressions - Question about actual and relative path
on Jan 22, 2017 at 8:24:39 pm

There 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



Return to posts index

Anja Riehl
Re: Expressions - Question about actual and relative path
on Jan 23, 2017 at 12:07:40 am

Ok, Thank you so much for your help Dan.
Anja


Return to posts index

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