Problem with muting a video track

smhontz wrote on 1/15/2004, 8:22 PM
I have the following setup:
Track 1 "Watermark": Semitransparent watermark extends length of project
Track 2 "Clips": Several video events, separated by gaps

I created a script based on others I've seen here to walk through the events on my "Clips" track and make a .jpg snapshot of the first frame of each event. That worked just fine. Then, I wanted to do the same thing, but with the "Watermark" track muted so the watermark doesn't show up. I added:

watermarkTrack.Mute = true;

right before the loop that enumerates and puts out the snapshots, but it appears that the mute doesn't take effect until AFTER the script finishes. So, I added a Vegas.UpdateUI immediately after the mute, and that DID mute the track (hiding the watermark) but then the snapshot code didn't work properly - the same snapshot was repeated several times. If I put a MessageBox function in, so there is a definite pause before the snapshot code, all works as it should. Something like this, then:

watermarkTrack.mute = true;
Vegas.UpdateUI();
MessageBox.Show("Click me to continue");
// Loop and do the snapshot

It appears that muting and unmuting video tracks are somewhat asynchronous with further execution of the script - i.e. you have no guarantee that it gets done before the next step.

Any advice?

Comments

No comments yet - be the first to write a comment...