Need More "FAQ's"

jetdv wrote on 2/11/2003, 12:48 PM
Based on these FAQs, I believe I can figure out how to script about 90% of what I need to do for this one particular weekly editing job allowing me to automate quite a bit of manual copying and pasting. Specifically all of section 2 will give me almost everything I need. Here's exactly what I need to do (with questions in bold:

1. Insert a sliding picture with a title over it with the following steps:
a. find the current track/position & add the picture (2.4)
b. Set 2 keyframes in Pan/Crop - 2 seconds in should be a keyframe set to default and the first keyframe should be off the right-hand side of the screen. Can you set keyframes for Pan/Crop from the script?
c. Go to the previous track. I assume trackEnum.movePrevious(); would work?
d. Insert text with a specific preset (2.5) and add a one second dissolve on each end (2.3) Could the script ask for the text and automatically change it?


Here is another commonly used sequence of events that, I believe, should be possible to script:

2. Edit with the following steps:
a. Take the currently selected event (2.1) and MOVE it up tracks (like pressing 8 on the Numpad) to a "Master" track (either track 1 or a track labeled "Master")
b. Move the to beginning of that clip (like CTRL-ALT-Left Arrow or, possibly, Numpad 7)
c. Add an automatic dissolve (like Numpad "/")
d. Go back to the end of the event


So, how much of this is "doable" with scripting?

(While I am a programmer, Java Script is NOT my language so I learn best by example.)

Comments

SonyPJM wrote on 2/11/2003, 2:57 PM
I've updated the FAQ to
(hopefully) cover the issues in your first set of questions.

I think all points in your second set of questions are possible but
not in the FAQ yet... really quickly though:

* 2.a: Just set the event's Track property to move it.

* 2.b and 2.d: It is probably not necessary to move the cursor around
for scripting operations but if so you can set Vegas.Cursor to the
event's Start or (Start + Length).

* 2.c: I think this may have been covered in the FAQs about FadeIn and
FadeOut properties.
jetdv wrote on 2/11/2003, 3:40 PM
Thanks SonicPJM,


OK, I can see where 2b & 2d would probably NOT be necessary (that's just the normal flow of how I currently do things using the keyboard because you HAVE to get back to the "split").

So, basically you are saying to extend the first clip forward 7 frames and the second clip backward 7 frames? (i.e. I DON'T want a fadeout/fadein, I want a dissolve) If so, what is the proper way to "extend" events?


Also, on the new 2.6 in the FAQ, If I want the object to come in FROM the right (instead of from the left as the example states) is that simply a NEGATIVE offset?

SonyPJM wrote on 2/11/2003, 3:51 PM
You can extend an event by calling its AdjustStartLength method... see the docs for more details.

Yes, if you want an event to come in from the right, use a negative offset in the MoveBy method.
jetdv wrote on 2/11/2003, 4:06 PM
Thanks SonicPJM. I appreciate the help.
jetdv wrote on 2/11/2003, 9:39 PM
SonicPJM, thanks to your help I was able to assemble 3 scripts to automate some tasks related to #1 which will make the weekly edit MUCH easier. It only took 2 hours of typing, determining code (both assembling pieces and creating new), and debugging to get it to work but it DOES work and work well. It can now automatically add the sliding picture on track 2 and the proper text on track 1, set the proper keyframes, and change to the proper dissolves.

Now... I just have to start trying to figure out #2!
SonyPJM wrote on 2/12/2003, 9:02 AM


Terrific! I'm happy to help.
jetdv wrote on 2/19/2003, 11:28 AM
SonicPJM,

Thanks for your tips above (AdjustStartLength) and your help with the RenderSegs2 script (mainly dealing with Timecode), I was able to write the script that does #2 in the original post. This script is going to be a TREMENDOUS time-saver when editing my multi-camera events. Thanks so much for your help and the scripting possibilities.