Skip to main content
April 3, 2012
Question

shifting start point of a footage item in a comp?

  • April 3, 2012
  • 1 reply
  • 821 views

hi,

i have serveral comps which represent each shot in a film. I have an animatic video that shows the full film in the project panel. Basically i am trying to find a way of adding the animatic video to each comp to use as a guide. The tricky part is i want to shift the start point of the video in each comp so that the video plays from the correct frame (in relation to the start of the particular shot) in each comp.

The comps are all set to the correct length in the first place.

does anyone have an idea of how to do this?

thanks for your time,

Sam

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
April 3, 2012

It's easy to change the start time of a layer:

yourAnimaticLayer.startTime = (new start time);

or,

yourAnimaticLayer.startTime -= (start time offset);

The trick is knowing how much to move it. I'm not sure how you figure that out unless it's something you already know for each comp, or you can calculate if from the preceeding comp durations.

Dan

April 3, 2012

hi, this seems simple. However i can seem  to get this to work.

I have my chosen footage layer selected through a variable: footageLayer. So i've written:

for (i = 1;i <= compsFolder.numItems; i++) {

    compsFolder.item(i).layers.add(footageItem);    //add footage item

    footageItem.startTime= ( i );                              //increment the start time of the footage item by 'i' for each comp.

}

though i think i must be missing something in the startTime command.:)

thanks,

Sam

Dan Ebberts
Community Expert
Community Expert
April 3, 2012

You need to move the layer, not the footage:

var myLayer;

for (i = 1; i <= compsFolder.numItems; i++) {

  myLayer = compsFolder.item(i).layers.add(footageItem);

  myLayer.startTime = i;

}

Dan