Skip to main content
Participant
May 2, 2018
Answered

Not able to change the start and end values of track item

  • May 2, 2018
  • 1 reply
  • 420 views

I am developing an extension for Premiere Pro.I need to import .mogrt into sequence and am able to do that using the API importMoGRT provided by Premiere Pro.

API

var newTrackItem = activeSeq.importMGT( mogrtToImport.fsName, targetTime.ticks, vidTrackOffset, audTrackOffset);

In the API i am able to change the targetTime.ticks which sets the starting time of the track item.But where do i set the end time/duration of the trackitem

Alternate option

I tried to use the attributes of the trackitem namely start, end, inPoint, outPoint (In the API documentation it is given as read/write attribute).But i am not able to change any of these attributes.

How do i set the start, end, duration of the trackitem?

This topic has been closed for replies.
Correct answer Bruce Bullis

In the posted sample code, if you add this line right after  "if (newTrackItem)", you can set the duration of the new track item.

newTrackItem.end.seconds = newTrackItem.start.seconds + 7.000;

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
May 2, 2018

In the posted sample code, if you add this line right after  "if (newTrackItem)", you can set the duration of the new track item.

newTrackItem.end.seconds = newTrackItem.start.seconds + 7.000;