Comments

jetdv wrote on 4/17/2003, 9:50 PM
I know that at least some aspects are available via a script. I have a script that will add pan/crop keyframes to slide a picture onto the screen over a period of two seconds. See the following FAQ and look specifically at section 2.6.
Veasna wrote on 4/22/2003, 9:54 PM
Thank you, Jetdv, for your pointer. It really helped to get me started. Now, I am running into another problem or possibly a current limitation of the current vegas script implementation. I am hoping perhaps our SF staff can help answer this one.

Basically, I can do a move, scale, and rotate operations via the public methods of the VideoMotionKeyframe class. Each of these operations applies the computation to all the vertices (TopLef, TopRight, BottomLeft, and BottomRight).

What I would like to do is the ability to modify individual vertices and not all of these four corner coordinates at the same time. The script manual indicates that the VideoMotionBounds member, bounds, is for both get/set operations. So, I have tried to modify individual vertices (TopLef, TopRight, BottomLeft, and BottomRight) that are contained with the VideoMotionBound member. However, this action does not seem to modify anything to the given event. In addition, I don't see any option to specify the type of interpolation curve between keyframe via scripting.

Can SF folks please help answer this for me? Please let me know if this is the current limimation of your script implementation OR perhaps, I hope, I have missed some steps somewhere that can make this works? If this is a limitation, can you let me know if you plan to add this ability some time in the near future?

Thank you in advance for your kind assistance.

-Veasna
SonyPJM wrote on 4/23/2003, 10:02 AM
I think all you need to do is first get the bounds, tweak its vertices
, then set it back like so:


var bounds = evnt.VideoMotion.Keyframes[i].Bounds;
bounds.LeftTop.X = newLeft;
bounds.LeftBottom.X = newLeft;
evnt.VideoMotion.Keyframes[i].Bounds = bounds;


The thing to keep in mind is that the VideoMotionBounds object is not
"live" or fully connected to the video motion keyframe. Rather, it is
copied in and out as a whole. I realize it is contrary to how almost
everything else in the API works but the reason is so you can
manipulate the vertex components one at a time without triggering
bounds integrity checks each time. Instead, everything is checked at
once when the entire bounds is set (actually, the checks are not
currently done but they will be soon ;-).
Veasna wrote on 4/23/2003, 1:45 PM
Hi SonicPJM,

Thank you very much for the clarification about how the VideoMotionBounds object was implemented. Now, I can successfully manipulate individual vertices as needed.

Can you let me know about the answer to my question concerning the lack of manipulation of the interpolation curve specification between keyframes?

Thank you again for your excellent assistance!!

-Veasna
SonyPJM wrote on 4/23/2003, 3:40 PM
I'm afraid setting the interpolation curve type of event motion is not currently possible via the scripting API but I try to add that in the upcoming release.
Veasna wrote on 4/23/2003, 5:44 PM
Excellent!! I am looking forward to the next update of the scripting API.

Thank you very much.

-Veasna
cgarrett wrote on 10/3/2004, 3:54 PM
can i ask what kind of object or data type "newLeft" is in your example? any assignment i make throws an error...

would love anymore examples people have of setting coordinates of the viewport into the orignal media!

thanks in advance.
JohnnyRoy wrote on 10/5/2004, 9:09 AM
> can i ask what kind of object or data type "newLeft" is in your example?

In the example Paul gave, "newLeft" is a VideoMotionVertex. A VideoMotionVertex has two attributes X and Y. You should get a copy of the Vegas 5 Script Developers Kit which will explain the API in detail.

~jr