ActiveTake = none

Teetow wrote on 9/4/2009, 5:46 AM
It's quite common for us to manually set ActiveTake to None, in order to temporarily prevent Vegas from loading the file (in case of dodgy video codecs, for example). We want to script this, rather than right-clicking and traversing the context menu.

I did some quick debugging, and noticed that Event.ActiveTake is actually set to null in these cases. I cannot, however, set it to null through code, since it raises an exception ("value cannot be null").

How would one go about doing this?

Comments

JohnnyRoy wrote on 9/4/2009, 6:45 AM
> How would one go about doing this?

It looks like you can't. Apparently Vegas is violating it's own Script API via it's GUI. A better design choice might have been to actually have a first class object that represents an EmptyTake. Perhaps a take without a media stream? I know a lot of tightening of the Script API went on to eliminate null objects being passed and this apparently is one case where a null object is valid yet not allowed. :(

~jr
Teetow wrote on 9/4/2009, 7:28 AM
Yeah, that's what I was afraid of.

I've shelved the project for now due to time constraints, but your idea certainly sounds like a decent workaround.

I'll hop over and submit a bug.
altarvic wrote on 9/4/2009, 11:12 AM
try event.Takes.Clear()