Working on a script that takes a show build sequence of nested sequences and then finds all the nested sequences in the project panel, duplicates them, iterates version number, and then puts the newly versioned sequences in the bin where the original came from. From there, the new nested sequences are cut into the show build sequences identically to how they were laid out originally.
Only issue I'm having here is when using the overwriteClip() function.
Though I'm only cutting in the video - app.project.sequences[index].videoTracks[index].overwriteClip(projectItem,
time) - this method will STILL cut in the audio.
Anyone have any insight as to how to avoid overwriteClip() defaultly cutting in the corresponding audio?
There's no API for adding only the audio or video portion of an a/v clip.
Potentially helpful: Here's how to unlink the audio and video portions of a clip, already in a sequence: https://github.com/Adobe-CEP/Samples/blob/63f176a4903b9be9e6aa73133ae689a3904f78c8/PProPanel/jsx/PPR...
There is a fun trick:
var seq = app.project.sequences[s]; // target sequence var nest = app.project.sequences[n]; // nested sequence nest.projectItem.setOutPoint('0', 2); // set project item audio outpoint to 0; seq.videoTracks[i].overwriteClip(nest.projectItem, time); nest.projectItem.clearOutPoint(); // clear outPoint (in case you will need this later)
This doesn't work for opposite, when you want to overwrite audio clip and omit video clip.
I used setOutPoint ('0', 2), which means that your nested sequence starts at 0.
Otherwise you can use pass different start time.
Appreciate the replies! However, I could not get either of these ideas to work. Maybe (probably) it's just me.
I was able to do this however...
Before I overwrite the new nested sequence into the showbuild sequence, I manipulate the Audio Channel Mapping:
var mapping = theDupCap.getAudioChannelMapping;
mapping.audioClipsNumber = 0;
Then, a few other things in the script happen and the theDupCap is eventually overwritten into the showbuild sequence.
I then want to change Audio Channel Mapping settings back to normal after the overwrite, but that doesn't seem to work out.
This is the code I use to try and revert the audio settings back to normal and it's written right after I use the overwriteClip() Method:
mapping = theDupCap.getAudioChannelMapping;
mapping.audioClipsNumber = 1;//fails here
mapping.audioChannelsType = 1;
Essentially, I want to:
-Change the Audio Channel settings.
-Do somemthing with that object.
-Change Audio Channel settings again.
I hope this is a clear explanation.