Vegas 10 Scripting API Bugs

altarvic wrote on 11/20/2010, 5:13 AM
When a script applies any Boris Continuum Complete effect to events/tracks the following exception is raised: Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING)).

Debugging showed that reading PlugInNode.ClassID property throws this exception:
'ClassID' threw an exception of type 'System.Runtime.InteropServices.COMException' System.Guid {System.Runtime.InteropServices.COMException}

Can someone confirm this?


JohnnyRoy wrote on 11/21/2010, 10:59 AM
This is a known bug when applying any OFX plug-in via a script. It was reported to Sony and hopefully it will be fixed in an update.

altarvic wrote on 11/21/2010, 8:35 PM
Thanks, John.
Here's another bug, which I found: when a few keyframes are added to any Generated Media or Effect, the very first keyframe becomes the last. I don't know whether this is a known bug or not, but it is very annoying. Later I'll post a sample script that demonstrates this problem.
altarvic wrote on 11/22/2010, 10:15 AM
Here is the code:

using System;
using Sony.Vegas;

class EntryPoint
public void FromVegas(Vegas vegas)
PlugInNode colorPlugIn = vegas.Generators.GetChildByName("Sony Solid Color");
Media media = new Media(colorPlugIn, "Red");
media.Length = Timecode.FromSeconds(15);

Keyframe kf = new Keyframe(Timecode.FromSeconds(5));
kf.Preset = "Green";

kf = new Keyframe(Timecode.FromSeconds(10));
kf.Preset = "Blue";

foreach (Keyframe k in media.Generator.Keyframes) k.Type = VideoKeyframeType.Hold;

VideoTrack track = vegas.Project.AddVideoTrack();
VideoEvent @event = track.AddVideoEvent();
@event.Length = Timecode.FromSeconds(15);
@event.Takes.Add(new Take(media.GetVideoStreamByIndex(0)));

The script creates the Color Generated Media with 3 keyframes. The length is 15 seconds. First keyframe (at 00:00:00,000) is Red. Second (at 00:00:05,000) is Green. And the last keyframe (at 00:00:10,000) is Blue. Script works fine in Vegas 9. In Vegas 10 keyframes are messed up! As you can see in the following images, the first keyframe (Red) becomes the last (at 00:00:10,000), second (Green) becomes the first.

Vegas 9

Vegas 10

ForumAdmin wrote on 12/2/2010, 11:18 AM
Thank you for that detailed bug report. The problem should be fixed in the next release.