| Shot numbers: text value advances at layer markers
• | | | |
 | Shot numbers: text value advances at layer markers
by Tom Masters 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.
| | | | |
• | | | |  | Re: Shot numbers: text value advances at layer markers by Dan Ebberts 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
| | | | |
• | | | |  | Re: Shot numbers: text value advances at layer markers by Tom Masters on Oct 5, 2012 at 12:02:05 am |
That did it.
Dan.
Thank you once again!
| | | | |
• | | | |  | Re: Shot numbers: text value advances at layer markers by Tom Masters 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!
| | | | |
• | | | |  | Re: Shot numbers: text value advances at layer markers by Dan Ebberts 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
| | | | |
• | | | |  | Re: Shot numbers: text value advances at layer markers by Tom Masters on Oct 5, 2012 at 2:50:14 am |
nice.. thx.
| | | | |
| |
|