Moving a marker to a layer's inPoint and outPoint


You want to move markers in Animation Composer at regular intervals between the inPoint and outPoint of a layer.

But it doesn’t work well
Please help me

Hi @LemonBlue ,
I couldn’t understand your explanation so i am not sure where exactly you want to move each marker.

can you try to explain it again? (or give an example)

are you trying to move the first marker (TR In) to the in point and the second marker (TR Out) to the out point of the layer?

if you want to move markers setting the “time” property won’t do the job because the “time” property is only an indicator property used by all other properties/actions,

  • for example the “delete marker” action will check the “time” property value and if there is a marker in this time it will remove this marker,
  • the “add marker” action will add a new marker in the current value of the “time” property,
  • the “index” property will check if there is a marker in the value of the “time” property and it will return its index.

all the markers properties and action are based on this time property, so changing this time property alone will not change anything, the loop “markers in layer/items” only sets each cycle this “time” property for the next marker time.

to change the time of a marker you need to delete the marker, and then create this marker again at a new time.

in this example I move the first marker to the in point of the selected layer

  1. loop over the layers in the active comp
  2. if a layer is selected
  3. loop over its markers
  4. if the comment of a marker is “TR In”.
  5. delete this marker
  6. set the time property value to the in point of the layer
  7. add a marker (at this new time value) with the comment “TR In”.

Download -
move first marker.json (9.6 KB)

I know it’s not intuitive and quite confusing and if it was up to me it would work the way you thought it should work but that’s how Adobe designed the markers and keyframes to work, so I had to implement it that way too.

Thank you so much. Now I can create new scripts!