I'm trying to write a script that adds a solid black color to Vegas Pro, but I don't know how to apply the function so that the solid color is black instead of white. Could someone help me?
using System;
using System.Windows.Forms; // Namespace required for MessageBox
using ScriptPortal.Vegas;
namespace Test_Script
{
public class EntryPoint
{
public void FromVegas(Vegas vegas)
{
// Get the first track of the project
Track Mtrack = vegas.Project.Tracks[0];
string genUID = "{Svfx:com.vegascreativesoftware:solidcolor}"; // UID of the Solid Color plugin
PlugInNode plugin = vegas.Generators.GetChildByUniqueID(genUID);
// Check if the plugin was found
if (plugin == null)
{
MessageBox.Show("The solid color generator was not found.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
// Creating media from the plugin
Media media = new Media(plugin);
MediaStream stream = media.Streams.GetItemByMediaType(MediaType.Video, 0);
// Creating a video event with a duration of 15 seconds
VideoEvent newEvent = new VideoEvent(vegas.Transport.CursorPosition, Timecode.FromSeconds(15));
Mtrack.Events.Add(newEvent);
// Creating the Take for the event with the media stream from the Solid Color plugin
Take take = new Take(stream);
newEvent.Takes.Add(take);
}
}
}