VEGAS Pro Scripting API Wishes

NickHope wrote on 10/17/2016, 9:18 AM

Further to this post, here are 3 commands that I have really wanted to be able to access through scripting:

  1. Post-edit ripple ( CTRL+F )
  2. Trim the start of the selected event to the cursor position ( ALT+[ )
  3. Trim the end of the selected event to the cursor position ( ALT+] )

I am no programmer, and I'm sure the scripting gurus will have many more requests for extending the scripting API.

Comments

altarvic wrote on 10/17/2016, 11:17 AM
  1. DO NOT delete or change existing methods and properties.
  2. New classes/methods/properties to work with Pan/Crop masks (create/edit/delete/copy...) 
  3. Let me decide whether or not to create Undo actions for my edits. For example, I want to create UI that updates Track Motion properties in real-time, i.e. I drag UI element and the position or rotation of a track is changed accordinally. I can not do this w/o generating tons of redundant Undo actions.
  4. Add full read/write support for all project properties: Pixel Format, Compositing Gamma, Deinterlace method etc.
  5. Add the name of the rendered file to Vegas.RenderStarted and Vegas.RenderFinished event.

    For example, you can create the descendant of RenderStatusEventArgs class:

    RenderStatusEventArgs2 = class (RenderStatusEventArgs)
    {
       string[] FileNames; // some renderers create several files
       string FileName;    // equals to FileNames[0]
    }

    In this case you don't have to change delegate RenderStatusEventHandler(object sender, RenderStatusEventArgs args), just use the new class when you invoke RenderFinished event. This will ensure compatibility with old code.
    Alternatively, you can create new event Vegas.RenderFinished2 and Vegas.RenderStarted2

  6. Methods to load / save plugin chains (aka filter packages)

     You can implement them in Effects class, eg:

    class Effects 
    {
       void SaveFilterPackage(string name);
       void LoadFilterPackage(string name);
    }
  7. Properties to read/write some global Vegas options (in Options menu and in Preferences):

    class Vegas
    {
       bool QuantizeToFrames {get;set;}
       bool AutomaticCrossfades{get;set;}
       bool IgnoreEventGrouping {get;set;}
       bool CloseMediaFilesWhenNotTheActiveApplication {get;set;}
       bool AutomaticallyCropStillImagesAddedToTimeLine {get;set;}
       ....
    }    
  8. Programmatically reorder effects in Effects collection. Add Effect.Selected property to specify that this effect will be automatically selected when user opens Video/Media/Track/Project FX window.

  9. And the last but not least - allow ALL extensions to be run in Movie Studio (not only FASSTApps).
    If we can use OFX plugins in Movie Studio, why not extensions?

 

 

 

VEGASDerek wrote on 10/17/2016, 12:25 PM

Some good suggestions here.  I won't comment about any in particular except #9 from altarvic...

Movie Studio, fundamentally is a consumer application and it has been our view that scripting is a pro-level feature and is one of the bigger differentiators from Vegas (thus justifying the signifcant price difference).  I do not see that changing.  

VEGASNeal1 wrote on 10/28/2016, 10:37 AM

For those interested, here is a script sample that handles the "trim event to cursor" operations.

FocusOnVegas wrote on 10/30/2016, 6:41 AM

1     Up to date documentation for the existing Vegas API.
       As an example I discovered (with intellisense) that, starting from Vegas Pro 12,  AudioEvent has a property
      "Effects". It is not documented in the old documentation of the API from 2010. 

2    More examples and articles about scripting with C# and the Vegas API.
      I always thought it is only possible to select a preset of an effect from a script and that it isn't possible
      to set the individual parameters of an Effect. Because most of the (video) effects in the later Vegas versions
     are OFX video effects, it seems to be possible with the existing API for OFX effects. So, there is already a lot
     available in the API but the use of it is not always so straightforward as I wish. 

3   Beat (onset) detection / beat tracking of audio tracks
     It can be done with external libraries and rendering audio to external audio files. But why not enhance
     the API with this feature. It would make it more easy to make a script that creates an automatic montage 
     synchronously with music. Magix can "borrow" some code / algorithms from Magix Music Maker or,
     better, from universities like the Queen Mary university of London (Sonic Visualizer and Aubio), see
     http://c4dm.eecs.qmul.ac.uk/software_data.html

4   Tool that generates an installer for (compiled) scripts and extensions.
     There are a lot of directory locations users can place a script or extension. Many people place a script in the
     same directory as where the "factory scripts" of Vegas are located. Some directories are protected
     and the user needs administrator rights. Compiled scripts (.dll) from other computers seems to be
     "blocked" by Windows 10 /  Vegas Pro and need to be "unblocked" before the (compiled) script 'll execute.
      Localised versions of Vegas (f.i. German) can have other properties and directories  than the international
      version of Vegas. Some scripts 'll run only with the newer versions of Vegas Pro. So sharing a (compiled)
      script is not as easy as it should be, not for a (hobby) developper as for users.
      I need a tool that "generates" an installer for a (compiled) script or extension.
      Input: script file(s) and a specification for which Vegas versions the script is suitable
                and maybe some other options.
      Output: an installer that takes care of all the issues above (and maybe more).

 

 

 

 

FocusOnVegas wrote on 11/14/2016, 12:37 PM

Just 3 persons with wishes?

And we expect the marketing department of Magix gives high priority to improving and expanding the script API and documentation?

 

Kit-As-Was wrote on 11/14/2016, 4:41 PM

I think if the marketing department gets involved in scripting that will be a disaster... An Installer would be useful, also a friendlier script editor. Personally, I would like ways to automate functions regarding add as takes, replacing events and editing text. More options for more keyboard shortcuts (not exactly scripting, I know), navigation and zooming in and out on the timeline.

FocusOnVegas wrote on 11/27/2016, 5:44 AM

Nick Hope: "here are 3 commands that I have really wanted to be able to access through scripting"

It is possible to simulate keystrokes as a workaround with the System.Windows.Forms.SendKeys.Send Method, see: https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send(v=vs.110).aspx

But retrieving the current state of f.i. Auto Ripple (Cntrl L; "toggle" command) isn't possible. At least I can't find a way to do it.
So I totally agree that the API should be extended with the possibility to read the status and to set Vegas properties like "Auto Ripple" and "Post-Edit ripple".

 

altarvic wrote on 11/29/2016, 1:00 PM

There are 2 bugs in TrackGroup class:

1. Mute property ALWAYS returns TRUE

2. Solo property ALWAYS returns FALSE

Please fix.

VEGASDerek wrote on 11/30/2016, 8:32 AM

Looking at the code (I haven't tested this yet in a script), but there indeed appears to be a logic error with Mute and Solo for the TrackGroup class. We will put this into our bug database. Thanks.

altarvic wrote on 1/16/2017, 3:08 PM

Hi Derek,

I'm developing a script for Vegas Pro and faced with the problem.
I've created the test script so you can run it and see.

Please download it here: https://www.mediafire.com/?nm2q1obfjya2hns

The script is simple: it creates a new project and adds another project to the
timeline (as nested project). Vegas HANGS... Almost always.
(sometimes it just works, try to run it several times).

Test.veg project (nested project) contains test.mp4 clip,
which is XAVC-S video file. I believe that the problem is somehow related with this format and scripting API.

If I replace XAVC-S video with another format - no problem.

Just unzip the files to C:\Test folder and run the script with Tools > Scripting > Run Script... menu command.

Looking forward to your reply.
Thank you!

VEGASDerek wrote on 2/1/2017, 3:58 PM

Hello altarvic,

One of our engineers finally got to look at this...there definitely seems to be something unusual happening with how Vegas is handling that media. We have entered an issue into our bug system.

Thanks.

NickHope wrote on 3/29/2017, 10:38 AM

There are 2 bugs in TrackGroup class:

1. Mute property ALWAYS returns TRUE

2. Solo property ALWAYS returns FALSE

Please fix.

From the VP14 build 244 release notes:

"The TrackGroup scripting class has been updated so that the Mute and Solo properties now return the correct values as expected."

Thanks Magix!

altarvic wrote on 5/10/2017, 5:33 AM

Bug: Method ExpandTrackGroup in TrackGroup class collapses the group if it is already expanded.

Tested in build 252.

Matesaktesak wrote on 12/19/2017, 12:10 PM

Id like them to add getSelectedEvent();

 

Example:

String plugIn = "739f404d-47fe-4bce-b05b-212f35ed455c" // Vegas white balance

Media[ ] selected = getSelectedEvent();

foreach(Media media in selected){

media.Effects.add(Effect(vegas.VideoFX.GetChildByClassId(plugIn)));

}

 

IAM4UK wrote on 7/1/2018, 1:40 PM

Is there a script to add a VideoFX to all video tracks in a .veg file? (For example, add the VFX "Black & White" to all tracks...)

jetdv wrote on 7/1/2018, 6:04 PM

Is there a script to add a VideoFX to all video tracks in a .veg file? (For example, add the VFX "Black & White" to all tracks...)


Excalibur will do that for you!

IAM4UK wrote on 7/1/2018, 7:29 PM

Excalibur will do that for you!

Does it work with Version 15? Also, when I clicked the link to purchase license (to find out how much it costs), it went to an error like "Unable to find a route to the specified URL"

vkmast wrote on 7/2/2018, 2:10 AM

@IAM4UK

https://www.vegascreativesoftware.info/us/forum/script-for-removing-gaps-on-timeline--111608/#ca690683 and https://www.vegascreativesoftware.info/us/forum/excalibur-for-jetdv--110450/#ca682499 and http://www.jetdv.com/vegas/forum/etbio.php (@jetdv)

jetdv wrote on 7/3/2018, 9:15 AM

Excalibur will do that for you!

Does it work with Version 15? Also, when I clicked the link to purchase license (to find out how much it costs), it went to an error like "Unable to find a route to the specified URL"


Yes, it works in 15. Please e-mail me directly for purchasing questions.

NickHope wrote on 9/2/2018, 10:46 PM

Bug: Method ExpandTrackGroup in TrackGroup class collapses the group if it is already expanded.

Tested in build 252.

@altarvic Reportedly fixed in VP16.

ad48hp wrote on 11/10/2018, 11:29 AM

Hello.

Can you implement custom .Net V/A FX in Vegas, that could be accessed through Bitmap or Image component ?

I would love to write my own filters in .NET, as the OpenFX is really hard to grasp for me.

.

VT_91 wrote on 12/10/2021, 6:09 PM

I am not a programmer and I don't think that I would be able to learn C# to solve this problem.

I would like to insert an automatic standardized transition between all bits of video in a track.

In the past I used PowerDirector and it had a button to automatically insert transitions.
It looked like this:



Would it be possible to write a script to do a similar thing in Vegas?
Overall, I like Vegas more, yet this is the only feature that I miss that was available in other editors.
Thank you.
 

Here I asked a question about the existence of this feature in Vegas another forum.
https://www.vegascreativesoftware.info/us/forum/inserting-automatic-transitions-of-a-preset-length--133204/

jetdv wrote on 12/11/2021, 9:55 AM

@VT_91, that is not a scripting request as scripting can already do this (as I indicated in your other post - you can do what you're wanting using Excalibur). This would be a "feature request" - not a "scripting API wish".

VT_91 wrote on 12/11/2021, 12:58 PM

Excalibur will do that for you!

Does it work with Version 15? Also, when I clicked the link to purchase license (to find out how much it costs), it went to an error like "Unable to find a route to the specified URL"


Yes, it works in 15. Please e-mail me directly for purchasing questions.

I have issues setting up Excalibur.
This adds to the reasons why I may end up asking my boss to purchase a different video editing software next year — one that would have all the features included.