Skip to main content
Hey Evgenii
Inspiring
February 12, 2024
Question

Extendscript: override or insert project item as individual clips

  • February 12, 2024
  • 1 reply
  • 997 views

Hi guys I am tried to understand is there a way to paste the sequnece item into timeline via extenscript the
way we use 'insert or overwrite sequneces as nests or indivudual clips'? 


so with this button sequence is inserted as clips




usuall inserClip doesn't work, 

QE doesn't work either, however there is are some flags, that I don't really know are about vTrack.overwrite(qePi, '00:00:05:00', false, false, false, false)

my main goal is just to avoid copy-pasting effects and from the clips inside the sequences. I need to break the sequence into the clips


Thank you, 
Evgenii

 

This topic has been closed for replies.

1 reply

Bruce Bullis
Community Manager
Community Manager
February 13, 2024

I think you'll see that behavior change, depending on the state of the "insert and overwrite sequences as nests or individual clips" setting, here:

Hey Evgenii
Inspiring
February 13, 2024
//without QE
var seq = app.project.activeSequence;
var time = new Time();
var itemToInsert = app.project.rootItem.children[11]
time.seconds = 0;
seq.videoTracks[0].insertClip(itemToInsert, time, 0, 0);
//seq.videoTracks[0].insertClip(app.project.sequences[0], time, 0, 0); //cause ppro crash

//with QE
app.enableQE();
var vTrack = qe.project.getActiveSequence().getVideoTrackAt(0);
var qePi = qe.project.getSequenceItemAt(2);
vTrack.insert(qePi, "00:00:10:00", false, false, false, false); //have no ideas what are the flags for
vTrack.insert(qePi, "00:00:20:00", true, false, false, false);
vTrack.insert(qePi, "00:00:30:00", true, true, false, false);
vTrack.insert(qePi, "00:00:40:00", true, true, true, false);
vTrack.insert(qePi, "00:00:50:00", true, true, true, true);

None of the methods don't work , with or without the option. Inserting the sequence obj causing the ppro crash

Bruce Bullis
Community Manager
Community Manager
February 13, 2024

Not sure what's at app.project.rootItem.children[11], but PProPanel's example code successfully inserts new trackItems.

[The commented-out line will always fail, because you're passing a Sequence object, not a projectItem.]