ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Modifty a Marker's time with an expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Orlando Rodriguez
Modifty a Marker's time with an expression
on Nov 22, 2019 at 3:41:43 pm

I've been working on creating an Essential Graphics template to be used in Adobe Premiere and I would like to give the users the ability to change the duration of the template by adjusting a slider. I found an expression to trigger an animation with a marker from a YouTube channel called Animoplex who based his expression on an expression written by Dan Ebberts.

Now I would like to be able to link the marker's time to the slider but I'm afraid that can only be controlled with a script and not a simple expression. I'm hoping I'm wrong which is why I'm reaching out to this community. Any help or alternative suggestion would be greatly appreciated.

-Orlando

src = comp(name).layer("Markers");
n = 0;
if (marker.numKeys > 0) {
n = marker.nearestKey(time).index;
if (marker.key(n).time > time) {
n--;
}
}

if (n == 0) {
0
} else {
m = marker.key(n);
myComment = m.comment;
t = time - m.time;
try {
mark = src.marker.key(myComment);
if (src.marker.numKeys > mark.index) {
tMax = src.marker.key(mark.index + 1).time - mark.time;
} else {
tMax = src.outPoint - mark.time;
}
t = Math.min(t, tMax);
mark.time + t;
}catch (err) {
0
}
}


Return to posts index

Dan Ebberts
Re: Modifty a Marker's time with an expression
on Nov 22, 2019 at 5:41:18 pm

>I'm hoping I'm wrong...

Unfortunately, you're not wrong. You can't re-position a marker with an expression.

Dan



Return to posts index

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