I am wondering if scripting can be done with the Pan/Crop event in terms of doing pan and zoom for a given event on the timeline. It is not obvious from reading the scripting API document whether this can be done or not.
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.
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?
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 ;-).
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?
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.
> 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.