ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Triggering animation with markers without comments

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Allan Ricarte
Triggering animation with markers without comments
on Dec 5, 2018 at 2:28:28 am

Hi there,

So, is there any way around that i can trigger them without comments?

Thanks for the help!

action = comp('Markers');
n = 0;
if (marker.numKeys > 0)
{n = marker.nearestKey(time).index;
if (marker.key(n).time > time)

if (n == 0)
mostRecent = marker.key(n);
layerMarkerName = mostRecent.comment;
tDif = time - mostRecent.time;
actionMarker = action.marker.key(layerMarkerName);
if (action.marker.numKeys > actionMarker.index){
offset= timeToFrames(action.marker.key(actionMarker.index + 1).time)-1;
tDifMax = framesToTime(offset) - actionMarker.time;}
tDifMax = action.outPoint - actionMarker.time;}

tDif = Math.min(tDif, tDifMax);
actionMarker.time + tDif;}
catch (err) {

Return to posts index

Dan Ebberts
Re: Triggering animation with markers without comments
on Dec 5, 2018 at 7:21:01 am

I'm not sure what you're getting at exactly. The expression needs some way to know which action you want to trigger with each marker. The action markers themselves could be without comments, but the markers triggering the action would still need some way of identifying which action to trigger, so you would probably still need comments for those, identifying the marker index of the corresponding action marker. But I'm not sure if that gains you anything...


Return to posts index

Allan Ricarte
Re: Triggering animation with markers without comments
on Dec 5, 2018 at 3:58:04 pm

So basically, What I'm trying to achieve is to use the markers themselves to trigger the "animation" and use the markers comments to change
values in nested comps at the same time.

That's the idea behind it.

So, my first idea to identify each markers individually was changing "layerMarkerName" to number "layerMarkerName = 1" to specify markers, e.g "marker.key(1), marker.key(2)". after triggering at the first marker, it would add +1 to its value and so on, but I couldn't get it to work properly, i don't know if it is even possible to do that.

Hopefully, this all makes sense. Any help it'd be helpful.

Thanks for the answer!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved