Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects After Effects 2025 Broke Marker Comment Line break

  • After Effects 2025 Broke Marker Comment Line break

    Posted by Craig Trayler on May 22, 2025 at 3:48 pm

    Hi all, been banging my head on this one and hoping someone can help.

    I have a script that copies markers from one layer to another. It works perfectly in <strong data-start=”448″ data-end=”470″>After Effects 2024, but in <strong data-start=”479″ data-end=”501″>After Effects 2025, there’s a single issue: <strong data-start=”527″ data-end=”572″>line breaks in the comment field are lost.

    I use these marker comments to sync with subtitle layers, so <strong data-start=”636″ data-end=”662″>preserving line breaks (from pressing Enter in the comment box) is crucial. Here’s the core of my script:

    var sourceLayer = app.project.activeItem.selectedLayers[0];

    var targetLayer = app.project.activeItem.selectedLayers[1];

    var markers = sourceLayer.property("marker");

    app.beginUndoGroup("Copy Markers");

    for (var i = 1; i <= markers.numKeys; i++) {

    var time = markers.keyTime(i);

    var original = markers.keyValue(i);

    var marker = new MarkerValue(original.comment);

    marker.duration = original.duration;

    marker.chapter = original.chapter;

    marker.url = original.url;

    marker.frameTarget = original.frameTarget;

    marker.label = original.label;

    targetLayer.property("marker").setValueAtTime(time, marker);

    }

    app.endUndoGroup();

    This <strong data-start=”1821″ data-end=”1848″>seems like a regression or change in how MarkerValue(comment) handles multiline strings.

    Has anyone run into this? Any workarounds or scripting tricks that work in AE 2025?

    Thanks!

    John Martin
    replied 1 year, 2 months ago
    2 Members · 3 Replies
  • 3 Replies
  • John Martin

    May 22, 2025 at 8:21 pm

    just explicitly replace or reinsert line breaks using \n or \r before creating the new marker, lemme know if that works on your specific version.

  • Craig Trayler

    May 22, 2025 at 8:45 pm

    Hey John, thanks for the suggestion!

    I just gave that a try using both \n and \r and \\n and \\r, and before creating the marker, but sadly it still doesn’t work in AE 2025. The line breaks just get flattened into a space, and the comment shows up as one long line, even in the popup or when read through expressions.

    Seems like AE 2025 is stripping those characters now, which wasn’t the case in 2024.

    Appreciate the help though. If you find anything else that might work, I’m all ears!

  • John Martin

    May 22, 2025 at 8:52 pm

    report the issue to adobe, i’m sure it’s a bug, also try to rollback to the very first versions of AE 2025 and lemme know!

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