createSetInPointAction not working on ClipProjectItem?

,

Hi all,

not sure whether I´m doing something wrong or if this functions is just not working. But I can’t make createSetInPointAction work on ClipProjectItems:

async function testFunction() {
  var project = await ppro.Project.getActiveProject();
  var seq = await project.getActiveSequence();
  var selection = await seq.getSelection();
  var trackItems = await selection.getTrackItems();
  var firstItem = trackItems[0];
  var projItem = await firstItem.getProjectItem();
  var clipProjItem = await ppro.ClipProjectItem.cast(projItem);
  var ticktime = ppro.TickTime.createWithSeconds(1);
  try {
    project.lockedAccess(() => {
      project.executeTransaction((compoundAction) => {
        var setInPointAction = clipProjItem.createSetInPointAction(ticktime);
        compoundAction.addAction(setInPointAction);
      }, `Add Handles [1s]`);
    });
  } catch (error) {
    console.log("Error setting in point:", error);
  }
}

Console logs:

Error setting in point: TypeError: t.ScriptingUtils.getMasterClipFromProjectItemSync(...).createSetInPointAction is not a function

If I apply this to my trackItem → firstItem.createSetInPointAction(ticktime);, it works just fine.

Am I blind somewhere or is this a bug?

Thanks!

Hi Jannis,

createSetInPointAction() works correctly in the premiere_api sample; does that instance, work for you?

Hi,

createSetInPointAction() works fine for me on Sequences and ClipTrackItems. It is just not working on ClipProjectItems. Also the premiere_api sample does not have an example of this specific case.

However, I found createSetInOutPointsAction(inPoint, outPoint) does work for ClipProjectItems, so I just started using this one for now. Maybe the documentation needs to be updated as it also lists createSetInPointAction and createSetOutPointAction for ClipProjectItems (or these functions need to be checked?).

Thanks!