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

Shot numbers: text value advances at layer markers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
Tom MastersShot numbers: text value advances at layer markers
by on Oct 4, 2012 at 8:25:44 pm

I am attempting to automate making shot numbers on a layer of video.
The single layer of video has a marker at each edit (within the picture of the video)

I would like to make a text layer with a number.
Then make an expression that advances the number by an increment of 10 at each layer marker on the video layer. (I could also place these markers on the text layer to make it easier)
So it would go: 010, 020, 030, 040 etc...

This would be very handy in automating shot numbers for reference video.

thanks in advance.


Return to posts index
Reply   Like  


Dan EbbertsRe: Shot numbers: text value advances at layer markers
by on Oct 4, 2012 at 8:58:16 pm

Like this, I would think:


m = thisComp.layer("video").marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
s = "" + n*10;
while (s.length < 3) s = "0" + s;
s




Dan



Return to posts index
Reply   Like  
+1

Tom MastersRe: Shot numbers: text value advances at layer markers
by on Oct 5, 2012 at 12:02:05 am

That did it.
Dan.
Thank you once again!


Return to posts index
Reply   Like  


Tom MastersRe: Shot numbers: text value advances at layer markers
by on Oct 5, 2012 at 1:30:07 am

if I may humbly ask an extra:

an expression for type layer that will return the text in the label of the marker?

thanks!


Return to posts index
Reply   Like  


Dan EbbertsRe: Shot numbers: text value advances at layer markers
by on Oct 5, 2012 at 1:56:52 am


m = thisComp.layer("video").marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
(n > 0) ? m.key(n).comment : ""



Dan



Return to posts index
Reply   Like  
+1

Tom MastersRe: Shot numbers: text value advances at layer markers
by on Oct 5, 2012 at 2:50:14 am

nice.. thx.


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

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

[Top]