Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects expression for showing layer marker text

  • Filip Vandueren

    August 22, 2006 at 8:09 pm

    You mention you have to upgrade, but if you’re on AE 6.5, you don’t need this hack:
    you can just use the expression Dan mentioned using marker.value

  • Dan Ebberts

    August 22, 2006 at 11:19 pm

    It looks like you have to go all the way back to 5.5 to get it to work. And of course, with 5.5 there weren’t text layers so there’s not much you can do with it. 🙂

    Dan

  • Aharon Rabinowitz

    August 23, 2006 at 12:47 pm

    Hey there-

    Sorry – I’m under a deadline so I disappeared for a day. I tested this and I Have a few questions/comments.

    1. Thanks!

    2. If you add a new marker, it seems that it must contain the word “scene” before it or it doesn’t work. Is there a way to just have it show whatever is on the marker – or it must actually contain that word?

    3. It changes the Scene number AFTER the marker, not on it. Is there a way to change that?

    Thanks again.

    Aharon

    —————————————-
    Aharon Rabinowitz
    aharon(AT)yahoo(DOT)com
    http://www.allbetsareoff.com
    —————————————-
    Creative Cow Master Series DVD
    particleIllusion Fusion Volume 1
    available @ http://www.pIllusionFusion.com

  • Filip Vandueren

    August 23, 2006 at 7:25 pm

    Hey Aharon,

    the script cannot display whatever is the text of the marker, because like Dan said: reading the text of a marker is broken in the last few versions of After effects.

    The script uses a different method that’s not broken: you can say marker(2) or you can say marker(“2”) to select a marker: the first one selects the 2nd marker, the second one selects the marker who’s text is “2”

    So if you check all possible names a marker could have, and see if you ‘hit’ an existing marker, you can then compare the time of that marker to the playback time to determine if the found marker is the ‘current’ marker.

    In my example it creates possible names by adding a number from 1-110 after the word “scene “: those are the only markers the script will find. You can empty the ‘prefix’ string if it’s just numbers.

    Another possible method would be to compare markernames against a list of possible values like
    [“marker 1″,”marker 2″,”the third marker”,”intro”,”outro”,”music cue”] etc. which is not very helpful either.
    Any way: you have to know or calculate all possible values of the marker’s text for this to be succefull.

    I hope this helps.

    Let me know if you need a script utilizing the second aproach, though mind that I’m on a CET timetable 😉
    If you know someone who’s more versed in scripts rather than expressions, I still think that it would be a piece of cake to write a script that converts markernames to textsource keyframes, because I think the functionality is not broken in the scripting side of after effects.

    Oh, and thanks for your podcasts… They’re fun.

  • Aharon Rabinowitz

    August 25, 2006 at 2:01 pm

    Thanks. Got it. Sort of. Enough to know adobe needs to fix the problem.

    Ultimately we added scenes like 32A and such, so I had to do it by hand… alas.

    This has been very educational, and I know it will help a lot of people too. Thanks folks!

    Aharon

    —————————————-
    Aharon Rabinowitz
    aharon(AT)yahoo(DOT)com
    http://www.allbetsareoff.com
    —————————————-
    Creative Cow Master Series DVD
    particleIllusion Fusion Volume 1
    available @ http://www.pIllusionFusion.com

  • Greg C neumayer

    March 22, 2019 at 3:30 pm

    Just to update the archive, (since I was searching on this!),
    Here’s the updated code in AE2019:

    On your text layer, you can grab a bunch of properties by pasting this into the source text expression. The “Comment” is the marker text:

    m = thisLayer.marker.nearestKey(time);
    s = "time:" + timeToCurrentFormat(m.time) + "\r" +
    "duration: " + m.duration + "\r" +
    "key index: " + m.index + "\r" +
    "comment:" + m.comment + "\r" +
    "chapter:" + m.chapter + "\r" +
    "URL:" + m.url + "\r" +
    "frame target: " + m.frameTarget + "\r" +
    "cue point name: " + m.cuePointName + "\r" +
    "Event cue point? " + m.eventCuePoint + "\r";
    for (param in m.parameters){
    s += "parameter: " + param + " value: " + m.parameters[param] + "\r";
    }
    s

Page 3 of 3

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy