-
Why is thisComp.marker undefined in a script?
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