ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Is it possible to apply ValueAtTime to own layer?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dmitry Saltykov
Is it possible to apply ValueAtTime to own layer?
on Apr 22, 2018 at 7:53:03 pm

Hi!

Is it possible to apply ValueAtTime to own layer?
For example, such a simple layer motion script does not work:
x = 0;
fps = 30;
if (time > 0){
x0 = thisLayer.transform.position.valueAtTime(time - 1/fps)[0]; // previous value
x = x0 + 5;
}
[x,0]


p/s. this script is just an example


Return to posts index

Dan Ebberts
Re: Is it possible to apply ValueAtTime to own layer?
on Apr 22, 2018 at 9:07:54 pm
Last Edited By Dan Ebberts on Apr 22, 2018 at 9:10:50 pm

When using value() and valueAtTime() to refer to the property hosting the expression, you always get the pre-expression value, as if the expression didn't exist. There's no way for an expression to pass information to itself for use on future frames.

Dan



Return to posts index

Dmitry Saltykov
Re: Is it possible to apply ValueAtTime to own layer?
on Apr 23, 2018 at 7:20:41 pm

Thanks, Dan!


Return to posts index

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