Scripting API Changes in Vegas Pro 10.0b

ForumAdmin wrote on 12/22/2010, 12:41 PM
We made quite a few important additions to the scripting API in Vegas Pro 10.0b.:



* The ClassID property of the PlugInNode class is depricated. You should convert your code
to use the new UniqueID property which is a string rather than a Guid. OFX plug-ins do
not have GUID identifiers and will throw an ApplicationException if you attempt to
access the ClassID property. This change fixes problems with attempting to create OFX
Effects and getting the PlugInNode for existing OFX Effects.

* Added access to Open FX plug-ins and their parameters:

* The new IsOFX property of the PlugInNode class indicates whether the underlying
plug-in is an Open FX plug-in. If so, the new OFXPlugIn property gives you an
OFXPlugIn object which tells you a variety of information about the plug-in such as
its Label, Version, and PlugInPath.

* The new IsOFX property of the Effect class indicates whether the underlying effect is
an instance of an Open FX plug-in. If so, the new OFXEffect property gives you an
OFXEffect object which allows you to access individual parameters.

* The new OFXParameter class gives you access to individual Open FX parameters. The
ParameterType property tells you what type of parameter it is. Some OFX parameters
are inert, such as Page and Group parameters. Most however have values that you can
get and set using the Value property. These parameters are implementations of the
OFXParameter generic class and also have GetValueAtTime and SetValueAtTime methods
that you can use to maniplate animations. Some parameter types are implementations of
the OFXRangeParameter generic class which has Min, Max, DisplayMin, and DisplayMax
methods.

* OFXParameters have a ParameterChanged method which, when called, notifes the plug-in
that you have changed the parameter. You can use this method to invoke or 'press' a
PushButton parameter. The OFXEffect class has an AllParametersChanged method which
informs the plug-in that more than one parameter has changed. Although not always
necessary, you should call this after changing a batch of parameter values. In some
cases, invoking these methods will trigger the plug-in to request one or more frames
from the video engine which may be very time consuming. In some cases, the effect of
invoking a PushButton parameter depends on the CurrentTime property of the OFXEffect.

* OFXParameters have a Keyframes collection which contains OFXKeyframe objects.
OFXKeyframes are automatically created when you set the IsAnimated property of the
OFXParameter to true (creating the first keyframe) and call the SetValueAtTime method
of the OFXParameter. OFXKeyframes can be manipulated using their Time, Value, and
Interpolation properties. The Remove and Clear methods of the Keyframes collection
will delete keyframes but not the first one. To deletel all keyframes, including the
first one, set the IsAnimated property of the OFXParameter to false. Keyframes with
Double, OFXDouble2D, and OFXDouble3D value types provide access to OFXControlPoints
(PrevControlPoint[X|Y|Z] and NextControlPoint[X|Y|Z]) when Interpolation is set to
Manual or Split. Beware that OFXControlPoint is a struct, not a class, so you must
construct new ones with both time and value when assigning them to a keyframe. For
OFXDouble2D and OFXDouble3D value types, there are two control points for each
dimension of the keyframe.



* Added properties and methods that relate to stereoscopic 3D settings in Vegas projects.

* VideoProperties object (Vegas.Project.Video):

* New Stereo3DMode property determines which stereoscopic 3D mode is used for project
output. This property is set to one of the new Stereo3DOutputMode enumeration
values.

* New GetStereo3DSwap and SetStereo3DSwap methods determine whether the left and right
outputs are swapped for a given stereoscopic 3D output mode.

* New GetStereo3DCrosstalkCancelation and SetStereo3DCrosstalkCancelation methods
determine the amount of crosstalk cancelation is used for a given stereoscopic 3D
output mode.

* New GetIncludeCrosstalkCancelationInRenders and
SetIncludeCrosstalkCancelationInRenders methods determine whether crosstalk
cancelation is included in renders for a given stereoscopic 3D output mode.

* VideoStream object:

* New Stereo3DMode property gets or sets the video stream's stereoscopic 3D input
mode. This property uses the new Stereo3DInputMode enumeration values.

* New Stereo3DSwap property gets or sets whether the video stream's stereoscopic 3D
input channels are swapped.

* MediaPool object (Vegas.Project.MediaPool):

* New CanCreateStereo3DSubclip determines whether two Media objects are eligable to be
combined into a stereoscopic 3D Subclip object.

* New CreateStereo3DSubclip combines two Media objects into a stereoscopic 3D Subclip
object. A ImproperProjectSettingException is thrown if the project is not set to
one of the 3D output modes. A IneligableMediaException exception is thrown if one
of either of media objects cannot be joined. Media is not able to be combined for a
3D subclip. The most common reason for this failure is attempting to use media that
does not have synchronized timecode. You can use custom media timecodes to remedy
this.


You can download the updated script developer's kit here:

http://www.sonycreativesoftware.com/download/devkits

Enjoy!

Comments

No comments yet - be the first to write a comment...