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

  • Paperinik

    August 21, 2006 at 5:45 pm

    Oh, I’m sorry. I’ve confused layer marker with layer number.

    Paperinik

  • Aharon Rabinowitz

    August 21, 2006 at 5:52 pm

    Thanks.

    What I get is “Oject Marker property” instead of text.

    So that’s the problem, right?

    —————————————-
    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

  • Dan Ebberts

    August 21, 2006 at 6:06 pm

    That’s it.

    Dan

  • Filip Vandueren

    August 21, 2006 at 8:03 pm

    Hi Aharon,

    the Markers don’t happen to be called just 1,2,3,4,5,6 etc ?
    or “scene 1”, “scene 2″…

    if so, this hack can help:


    l=thisComp.layer(2); // pickwhip your markerlayer.

    prefix = "scene ";
    min=1;
    max=110;

    resultText="";

    for (i=min;i<=max;i++) { try { markerText=prefix+i; m=l.marker.key(markerText); if (m.time>time) {
    resultText=markerText;
    // if you're sure they're numbered correctly (1 2 3), you can enable the break
    // break;
    }
    } catch(e) {}
    }

    resultText;

    Also a script would probably not be affected by the bug, or usefull assistants might have a script.

  • Aharon Rabinowitz

    August 22, 2006 at 12:49 am

    Hi Filip-

    Yes – They are simply 1 2 3

    Unfortunatley, I couldn’t get this to work. I don’t beleive I’m setting this up correctly or pasting the code in properly.

    Can I ask you to post an example of this maybe with a text layer and a solid containing some markers, just to see how it should be arranged.

    Thanks for all of your help.

    And Dan thank you too. You’re always a huge help.

    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

  • Dan Ebberts

    August 22, 2006 at 4:34 am

    Aharon,

    If they’re just numbered sequentially, this expression for source text will give the number of the most recent marker:

    L = thisComp.layer(“audio layer”);

    n = 0;
    if (L.marker.numKeys > 0){
    n = L.marker.nearestKey(time).index;
    if (L.marker.key(n).time > time){
    n–;
    }
    }
    if (n==0)”” else n

    Dan

  • Filip Vandueren

    August 22, 2006 at 11:01 am

    Luckily you have people in different timezones working on this 😉

    anyway there was an error in there of course (was getting late for me…)

    here’s the correct code:

    l=thisComp.layer(2); // pickwhip your markerlayer.

    prefix = “scene “;
    min=0;
    max=110;

    resultText=””;

    for (i=min;i<=max;i++) { try { markerText=prefix+i; m=l.marker.key(markerText); if ((m.timehttps://users.telenet.be/vandueren//forumstuff/seqmarkertexthack.aep

  • Mike Clasby

    August 22, 2006 at 12:02 pm

    After Effects warning: Expected: ).
    Error occured on line 13.
    Expression disabled.

    This line, methinks:

    if ((m.time resultText=markerText;

    I tried subbing in two lines (below) from your first expression for the one above, these seemed logical (hacker’s logic), it wasn’t broken then, but still no text appears, I did the pickwhip to the layer with the markers and the expression is on the Source Text stopwatch of a Text layer:

    if (m.time>time) {
    resultText=markerText;

    I need to upgrade so I can see the aep, me bad.

  • Filip Vandueren

    August 22, 2006 at 5:11 pm

    Shoot,

    it’s an html related error, if you look at the source code of the page (or the emails) you’ll see it’s there, it doesn’t show up, that happens with > and <, symbols: html thinks it's a tag so it doesn't show up. anyway here it is again HTML encoded (this will look like gibberish in the auto-reply emails: l=thisComp.layer(2); // pickwhip your markerlayer. prefix = "scene "; min=0; max=110; resultText=""; for (i=min;i<=max;i++) { try { markerText=prefix+i; m=l.marker.key(markerText); if ((m.time<time)) { resultText=markerText; // break; } } catch(e) {} } resultText;

  • Mike Clasby

    August 22, 2006 at 6:16 pm

    Thanks for the comeback. I still can’t get it to work for me, but I’ll just keep a lookout for an Aharon response and if he’s good to go, then I’ll know I’m doing something basic, wrong.

Page 2 of 3

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