-
expression reading output of expression and misc questions regarding this
I’ve always avoided using the output of one expression as an input into another expression, though I see that it is possible…
Example:
Layer 1, with an expression on its xPos: Math.sin(time)and Layer 2, with an expression on its xPos: thisComp.layer(“Layer 1”).transform.xPosition
——
Is this sort of practice something that should be avoided or, if it is worthwhile in certain cases, are there any pitfalls to be aware of? Is there any way I can order the layers to speed up evaluation of the expressions? (Letting AE know that Layer 1 should be evaluated first and then Layer 2)
Would putting this expression on Layer 2–
thisComp.layer(“Layer 1”).transform.xPosition.valueAtTime(time – framesToTime(3));
— cause any additional concerns?Additionally, let’s say that there are keyframes on Layer 1’s xPos — can Layer 3 access Layer 1’s xPos value before the expression’s output masked it? (the keyframe data and not the output of the expression on Layer 1’s xPos)
——
If the above is okay, I imagine a cycle is still always a bad idea?
Example:
Layer 4, with an expression on its xPos: thisComp.layer(“Layer 5”).transform.xPosition * -1and Layer 5, with an expression on its xPos: Math.sin(time * 2) * 50 + thisComp.layer(“Layer 4”).transform.xPosition;
——
Thanks!
–Ross