Forum Replies Created

  • Vegas 17.0

  • Austin Brock

    January 1, 2020 at 4:33 pm in reply to: Applying crop preset to multiple clips at once?

    Just found this post when searching for the same issue. Thanks, Mike.

  • Austin Brock

    December 31, 2013 at 10:15 pm in reply to: How to generate text in scripting?

    If anyone wonders how I did this eventually, I made the format of the text I required in Sony Vegas, and then wrote C# to recreate the file I was using, like a temp.xml, and just overwrote it before using.

    Then I insert that media, and viola, it displays the correct text.

    // List of White Scorers
    generatorb = app.Generators.GetChildByName("Sony Titles & Text");
    CreateWhiteList(WhiteScoreString);
    mediad = new Media(generatorb, "EndScoresWhite");

    streamd = mediad.Streams[0];
    newEventd = new VideoEvent(endDisplay, endDisplayFor);
    app.Project.Tracks[2].Events.Add(newEventd);
    taked = new Take(streamd);
    newEventd.Takes.Add(taked);

    public int CreateWhiteList(string str)
    {
    string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "OFX Presetscom.sonycreativesoftware_titlesandtextGenerator" + "endscoreswhite.xml";

    if (File.Exists(path))
    File.Delete(path);

    using (StreamWriter sw = File.AppendText(path))
    {
    sw.WriteLine("<?xml version="1.0" encoding="UTF-8"?>");
    sw.WriteLine("");
    sw.WriteLine("com.sonycreativesoftware:titlesandtext");
    sw.WriteLine("1 0");
    sw.WriteLine(" {rtf1ansiansicpg1252deff0{fonttbl{f0fnilfcharset0 Interstate;}}");
    sw.WriteLine("viewkind4uc1pardlang1033bf0fs13 " + str);
    sw.WriteLine("}");
    sw.WriteLine("");
    sw.WriteLine("");
    sw.WriteLine("0.952941 0.952941 0.952941 1.000000");
    sw.WriteLine(" _None");
    sw.WriteLine("");
    sw.WriteLine("1.000000");
    sw.WriteLine("0.533000 0.220000");
    sw.WriteLine("0");
    sw.WriteLine("0.000000 0.000000 0.000000 0.000000");
    sw.WriteLine("0.000000");
    sw.WriteLine("1.000000");
    sw.WriteLine("7.500000");
    sw.WriteLine("0.000000 0.000000 0.000000 1.000000");
    sw.WriteLine("false");
    sw.WriteLine("0.000000 0.000000 0.000000 1.000000");
    sw.WriteLine("0.200000");
    sw.WriteLine("0.200000");
    sw.WriteLine("0.400000");
    sw.WriteLine("");
    }
    return 1;
    }

  • Austin Brock

    October 3, 2013 at 5:31 pm in reply to: How to generate text in scripting?

    My request was for example code for using “Sony Titles & Text” and customizing the text used.

  • Austin Brock

    October 2, 2013 at 6:28 pm in reply to: How to generate text in scripting?

    Could you possibly give some examples of the OpenFX plugins, please?

  • I already use two monitors, I was just hoping to utilize the space on the other machine.

    Thank you both for your swift replies :).

  • Thank you so much, John. That’s exactly what I needed.

    Basically after editing a multicam video using two videos, I wanted to move the videos that are not muted to the second track, and the videos not used to the first track. Then I plan to make the muted videos a small window in one of the corners and unmute them, so that the track 2 video is the large view, but you can see the track 1 video showing in the corner.

    This was my end result, it can only be executed ONCE per set of videos and is based on the default resolution of 1920×1080, but if I needed to modify anything, I could just mute the videos on track 1 before running the script again.

    VIDEO OF THE RESULT: https://www.youtube.com/watch?v=N8fdAfv0kAo

    using System.Windows.Forms;
    using Sony.Vegas;

    public class EntryPoint
    {
    public void FromVegas(Vegas app)
    {
    System.Collections.Generic.List muteWindow = new System.Collections.Generic.List();
    System.Collections.Generic.List normWindow = new System.Collections.Generic.List
    ();

    foreach (Sony.Vegas.Track currentTrack in app.Project.Tracks)
    {
    if (currentTrack.IsAudio())
    continue;

    foreach (Sony.Vegas.TrackEvent currentEvent in currentTrack.Events)
    {
    if (currentEvent.Mute == true)
    {
    // Move to track 1
    muteWindow.Add(currentEvent);

    } else {
    // Move to track 2
    normWindow.Add(currentEvent);
    }
    }
    }

    foreach (Sony.Vegas.Track currentTrack in app.Project.Tracks)
    {
    foreach (Sony.Vegas.TrackEvent currentEvent in muteWindow)
    {
    currentEvent.Track = app.Project.Tracks[0];
    }
    foreach (Sony.Vegas.TrackEvent currentEvent in normWindow)
    {
    currentEvent.Track = app.Project.Tracks[1];
    }
    }

    foreach (Sony.Vegas.TrackEvent currentEvent in muteWindow)
    {
    currentEvent.Mute = false;
    VideoTrack videoTrack = app.Project.Tracks[0] as VideoTrack;
    foreach (TrackMotionKeyframe keyframe in videoTrack.TrackMotion.MotionKeyframes)
    {
    keyframe.PositionX = -960+(480/2)+5;
    keyframe.PositionY = 540-(270/2)-5;
    keyframe.Width = 480;
    keyframe.Height = 270;
    }
    }
    }
    }

  • Cannot implicitly convert type 'int' to 'Sony.Vegas.Track' for currentEvent.Track = 0;

    The best overloaded method match for 'Sony.Vegas.TrackEvent.Copy(Sony.Vegas.Track, Sony.Vegas.Timecode)' has some invalid arguments
    Argument '1': cannot convert from 'int' to 'Sony.Vegas.Track'
    for CurrentEvent.Copy(0, CurrentEvent.Start);

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy