Skip to main content
Inspiring
September 4, 2015
Question

changing an existing markers comment

  • September 4, 2015
  • 1 reply
  • 948 views

I feel this must be a simple syntax error on my part but I'm stuck.

I want to edit the comment attribute of an existing marker. the .comment attribute is listed as read/write so I think this should be the correct way to do this.

app.project.activeItem.layers;

layerCollection[2].property("Marker").keyValue(2).comment = "helllo";

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
September 5, 2015

Assuming it's layer 1, which already has 2 existing markers, you could do it like this:

var markerVal = new MarkerValue("hello");

app.project.activeItem.layer(1).property("Marker").setValueAtKey(2, markerVal);

Dan

Known Participant
September 5, 2015

Thanks Dan. I appreciate it.

Is it possible to duration, time, chapter etc. this way?

brendanTAuthor
Inspiring
September 9, 2015

Dan,

Can you share how you changed a markers duration? The AE documention lists new MarkerValue(comment, chapter, url, frameTarget, cuePointName, params). I don't see duration in there. I'm probably missing something.


Woops. I found this from a previous post by you.

var myLayer = app.project.activeItem.layer(1);

var myMarkerVal = new MarkerValue("test comment");

myMarkerVal.duration = 1.5;

myLayer.property("Marker").setValueAtTime(2, myMarkerVal);