ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Move Layer via Layer Markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jacob Resch
Move Layer via Layer Markers
on Jul 20, 2018 at 7:52:29 am

Hello!
Maybe someone can help me with this here.
I have an Expression, which moves the Layer an x-amount of pixels for every layer marker on the layer.

But now i want to also add comments to the layer markers.
So for example a layer marker is called "20 pixel up for -x".
I want to implement that the expression has a differend slider distance, duration and direction for different comments on these layer markers.
Is that possible ?

Thanks a lot :)!!

sx = 50; // slide distance
sd = 10; // slide duration


m = thisLayer.marker;
y = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time &lt; m.key(n).time) n--;
if (n > 0){
t = time - m.key(n).time;
y = easeOut(t,0,sd,(n-1)*sx,n*sx);
}
}
value + [0,-y]


Return to posts index

Dan Ebberts
Re: Move Layer via Layer Markers
on Jul 20, 2018 at 3:32:18 pm

Definitely possible. You need to define the syntax of your marker comment text and then add some code to the expression that parses each comment to extract the parameters necessary to execute the slide.


Dan



Return to posts index

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