Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Why is thisComp.marker undefined in a script?

  • Why is thisComp.marker undefined in a script?

    Posted by Mo Dejong on May 23, 2008 at 5:43 pm

    Hi all

    I am just getting started with scripting and I noticed a problem accessing the marker field in a comp object. The thing that is weird is that I can access the same field in an expression.

    I have this saved in AccessCompMarkers.jsx:

    {
    thisComp = app.project.activeItem;
    markerKey = thisComp.marker;
    alertStr = “thisComp.name is ” + thisComp.name + “, thisComp.marker is ” + markerKey;
    alert(alertStr);
    }

    When I run this, I see the following:

    “thisComp.name is ERHIT, thisComp.marker is undefined”

    But in the same comp, I can create an expression like:

    thisComp.marker.numKeys

    The expression will evaluate to 1, the number of comp markers
    that exist in the active comp.

    Has anyone run into this before? I have AA 8.0.0.298 on WinXP.

    thanks
    Mo DeJong

    Simon Morris replied 17 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Simon Morris

    November 11, 2008 at 10:54 pm

    Yes, I’ve just been experiencing this. It’s annoying, as I really need to access the comp markers… did you find a solution, Mo?
    Cheers
    Simon

  • Simon Morris

    November 12, 2008 at 12:55 pm

    I’ve done a bit more investigation and while thisComp.marker.numKeys does indeed return the correct number of composition markers, if you try and access any of the marker info such as:

    thisComp.marker.keyValue(1).comment

    You get an error that keyValue is undefined.

    So right now, I’m not very hopeful that we’ll be able to get access to those markers unfortunately.

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