Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

Re: expression to show comments and duration between markers :)

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Share on Facebook
Respond to this post   •   Return to posts index   •   Read entire thread


Dan EbbertsRe: expression to show comments and duration between markers :)
by on May 25, 2012 at 4:26:22 pm

I think you're after something like this:



m = thisLayer.marker; //layer where the markers is
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
if (n == m.numKeys){ // after last marker
t = thisComp.duration - m.key(n).time;
c = m.key(n).comment;
}else if (n == 0){ // before first marker
t = m.key(1).time;
c = "";
}else{ //between two markers
t = m.key(n+1).time - m.key(n).time;
c = m.key(n).comment;
}
}else{ // no markers
t = thisComp.duration;
c = "";
}

c + "r" + timeToTimecode(t)



(note that the "r" in the last line should be "(backslash)r"


Dan



Posts IndexRead Thread
Reply   Like  
Share on Facebook


Current Message Thread:




LOGIN TO REPLY



FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]