Media.Regions weirdness (possible script bug)

Teetow wrote on 12/5/2007, 6:26 AM

public void Chop(Sony.Vegas.TrackEvent Event)
{
Sony.Vegas.Media Media = Event.ActiveTake.Media;

int NumRegions = 0;

if (Media.Regions != null)
NumRegions = Media.Regions.Count;


This is part of a script I'm writing. Everything looks fine in Visual Studio, but when I run it in Vegas I get an null object exception -- the Regions member doesn't exist in run-time, even though the media file I'm using has plenty of regions in it.

What gives? =)

Update: This seems to be a genuine bug. I tried compiling and running the "promote media markers" script from the default script menu, and it throws the same exception.