FORUMS: list search recent posts

jsx won't add comp Marker

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Freddy Rodriguez
jsx won't add comp Marker
on Jun 8, 2019 at 10:46:34 pm

Learning jsx, and am stuck at Markers. The sample code snippet in the Scripting Guide file is causing an error, and I can't figure out why no markers are placed inside my comp.

I start with a blank app. The code creates a new project, throws a new comp into it, and adds a single layer inside that one comp. The next and final step is to add 2 markers, each at 1sec and 3sec mark, respectively.

However, the code execution stops and the error status bar reads "undefined is not an object". Everything is defined! The comp is defined as a variable "comp", the markers are defined as "compMarker" & "compMarker2". So what gives?

help appreciated

Return to posts index

Freddy Rodriguez
Re: jsx won't add comp Marker
on Jun 9, 2019 at 1:52:10 am

.. after fiddling with it for a while, I was able to place layer markers but not comp markers. I figured I wasn't using the correct syntax to call the marker property of a comp -- and I realized right there and then that comps don't have properties, like Opacity/Scale/Position.

Turns out comps have their own special array that holds all the markers: comp.markerProperty...

The problem, however, is that I have After Effects CS6, and this ExtendScript feature was added starting with CC 2017, which explains (I guess?) why my app won't recognize it 😭

Unless I upgrade (which I won't), I am forever limited to using only layer markers. That's not too bad! A clever workaround would be to add a dedicated null layer to stand in as a "marker bar". Ha! I'm sooo clever..

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved