Having fun with the Active Sequence, Mute Tracks, Place Clips

Once we start getting into automating the Active Sequence, we can really speed up our workflows

This movie does not go very in-depth into what you can do with the active sequence, but it at least covers two topics that I find hugely helpful.

Muting Tracks
Muting tracks is definitely the easier of these two lessons today. All you need to do is target a track ( app.project.activeSequence.videoTracks[x] ) and test to see if the track is already enabled by ising the .isMuted() function. This will return true false, and from there you can make you decision on whether or not you’d like to use the .setMute() function on that track. In the movie, I provide some ode that can also be found in the Adobe GitHub sample code for toggling a track.
if(activeSeq.videoTracks[1].isMuted() == true){
activeSeq.videoTracks[1].setMute(false)
}else{
activeSeq.videoTracks[1].setMute(true);
}

Adding clips into the Timeline
Your two options for this is to either insert or overwrite the clips in.

Inserting a clip
will place that clip in at the time specified, and then shit the previously placed clips around it. It will push any clips that are in it’s way, to the end of its clip length. This can be a pain sometimes if it screws an a previously made edit.
This can be accomplished through app.project.activeSequence.videoTracks[x].insertClip(clip, timecode in seconds);

Overwriting a clip
will place that clip in the timeline wherever you specify, with no regards to what was tehre before it. It will not shift anything around, it will just place it on top and delete whatever was there before it.
This can be accomplished through app.project.activeSequence.videoTracks[x].overwriteClip(clip, timecode in seconds);

If you would like to place the clip at the current point where the player position is, you can do that by
var playerPosition = app.project.activeSequence.getPlayerPosition();
app.project.activeSequence.videoTracks[x].overwriteClip(clip, playerPosition.seconds)

It’s important that you notice the .seconds after our player position timecode. This coverts the time from TICKS to SECONDS.