What's new in Vegas 5

SonyPJM wrote on 4/19/2004, 8:08 AM

Here's a quick list of some of the changes to scripting in Vegas 5.

* Changed namespace from SonicFoundry.Vegas to Sony.Vegas. Almost all
Vegas 4 scripts will be broken but the fix is typically simply to
change the namespace import statement at the top of the script.

* New "Script Menu" folder (located in the Vegas 5 install dir)
contains the scripts you want to appear in Vegas' Tools.Scripting
sub-menu. Now you can have more than 10 scripts in the script menu
and you can organize them hierarchically by adding sub-folders to
the "Script Menu" folder. Menu scripts can still be added to the
toolbar.

* Custom toolbar and script menu icons: just place a 16X16 PNG image
with the same name as the script + '.png' in the "Script Menu"
folder. For example:

MyScript.js ==> your script
MyScript.js.png ==> your script's custom icon.

* New RenderArgs class allows you to set the same render parameters
that are available in the "Render As" dialog. A new version of the
Vegas.Render method accepts a single argument of type RenderArgs.

* System.Xml assembly is now loaded by default. If you want to use XML
classes, you'll still need to add the import statement(s) to the top
of your script but you won't need to use a script config file to
load the XML assembly.

* Script configuration files now should be named like this:

MyScript.js ==> your script
MyScript.js.config ==> your script's configuration file (still in xml format).

* Script config now available in global variable named
"ScriptSettings" as System.XmlDocument. This is a good way to pass
arguments into your script and save script settings.

* New static Timecode constructor methods including the native "nanos"
(actually units of 100 nanoseconds). Using these methods instead of
the normal Timecode constructors can help alleviate some errors
based on data type conversion. Some examples:

var t1 = Timecode.FromNanos(100000000);
var t2 = Timecode.FromMilliseconds(10000);
var t3 = Timecode.FromSeconds(10);

var t4 = Timecode.FromString("00:00:10:00");
var t5 = Timecode.FromFrames(10); // depends on project's ruler format

* PlugInNode.Presets collection allows you to enumerate the presets of
a plug-in without having to first add an effect to a track or event.

* Better support for offline media: You can create offline media in a
script by constructing a media object with a non-existing (but
otherwise valid) path. Then you can use Vegas & VidCap's "Recapture
Offline Media" functionality to actually capture the media. But
first you must set its TapeName, set its TimecodeIn, set its
TimecodeOut, and call the new CreateOfflineStream method.

* New Subclip class (subclass of Media) allows you to create and
manipulate subclips via script.

* Misc. tweaks and additions... I'll post the location of the new
Vegas Scripting SDK which includes the docs and FAQ when it becomes
available on our web site later this week.

Comments

cheroxy wrote on 4/19/2004, 8:57 AM
Wow! Amazing, thanks.
roger_74 wrote on 4/19/2004, 9:17 AM
I agree with cheroxy - thanks. ScriptSettings is a good idea, and the new Timecode methods really cleaned up my code.

Will we have the same luxury we had last year when you took requests? :-)
SonyPJM wrote on 4/19/2004, 9:42 AM
Give 'em to to me... some might even make it into 5.0b ;-)
roger_74 wrote on 4/19/2004, 9:55 AM
Ok :-)

- Grouping
- Auto Ripple after script operations
- Track settings (notably Level and Compositing Mode)

Those are the big three for now. I could ask for everything under the sun, but these seem fundamental.
roryk wrote on 4/19/2004, 11:50 AM
How about exposing capture data? And as a stretch, script support in the catpure tool.
JohnnyRoy wrote on 4/19/2004, 4:16 PM
Thanks for all the work you’ve done. The ScriptSettings sounds like a great new addition. Would you mind giving us some sample code that uses this to create / read configuration properties?

Also on my wish list:

TRACK MOTION

I have a couple of script ideas that require the manipulation of track motion to do multiple PIP’s. Now with 3D, you could make some awesome effects scripts, like quickly setting up a cube, etc. if we could manipulate track motion.

~jr
SonyPJM wrote on 4/20/2004, 1:40 PM
ScriptSettings sample code is on the way... stay tuned.
dust wrote on 4/21/2004, 2:35 AM
Sounds good, but what I really look for (and it was already on my wishlist for 4.0c, when it was said to be too late for 4.0c so we had to wait for 5) is script access to grouping. Please don't tell me we have to wait for the next release... I think this is the most important missing script issue!

I hope it is still possible to assign scripts to keys (Ctrl-1 etc) so programming them on a contourplus is possible?

Thanks, Dust
jetdv wrote on 4/21/2004, 6:30 AM
I hope it is still possible to assign scripts to keys (Ctrl-1 etc) so programming them on a contourplus is possible?

Actually it is possible to assign scripts to ANY key. Just go to options - preferences to the Keyboard tab and you can assign any key combination to any script.
Cheesehole wrote on 4/21/2004, 7:50 PM
* Custom toolbar and script menu icons: just place a 16X16 PNG image

Has anyone got this to work? I'm not getting a custom icon. Tried 24 and 8 bit PNG files - 16x16.
Nat wrote on 4/21/2004, 7:58 PM
works for me
jetdv wrote on 4/21/2004, 8:08 PM
I got it working. Make sure the picture is in the same folder as the actual script and is named as indicated. It DIDN'T work for me once until I discovered that I had it in the same folder as a LINK instead of the real script.

Excalibur, Tsunami, and Neon now have easily identifiable icons.
Cheesehole wrote on 4/21/2004, 8:24 PM
>It DIDN'T work for me once until I discovered that I had it in the same folder as a LINK instead of the real script.

Thanks that was it! I also had to switch it back to 24 bit PNG to get the rollover / saturation effect.
jetdv wrote on 4/21/2004, 8:28 PM
Same here. Turns blank on rollover.
Cheesehole wrote on 4/21/2004, 8:39 PM
Sorry I edited my post - when I used the 8 bit PNG it gave me a blank rollover effect, but when I swapped it out for a 24 bit PNG w/ alpha channel, (and restarted Vegas) I got the nice rollover effect. The saturation slider also effects the custom icons - hey wait it just wrecked my icons... had to restart Vegas to get them back :P
SonyPJM wrote on 4/22/2004, 5:39 AM
Instead of restarting Vegas you should just be able to select the menu item labeled "Rescan Script Menu Folder"
roger_74 wrote on 4/22/2004, 6:00 AM
There seems to be a bug when you hover over the icons in the script menu in Vegas. The icon changes to the icon below. Script icons on the toolbar have the same behaviour.
Cheesehole wrote on 4/22/2004, 8:26 AM
I had something weird going on with the icon rollovers, but then it went away. Your problem has persisted?

Another problem I noticed when adjusting the saturation setting under Preferences | Display. My Icons reverted to the defaults, but with my custom icon squished into the corner of the default icon. I had to restart Vegas to clear that up.