(A George Script For Aura)

Written By J.L. White


I have been meaning to write this one for some time but had a Real need when I was making the avi files for AuraFX. A number of the effects samples I had were just 1 frame each showing the different options you could use, then I had placed them all in one layer. That is fine when you are just looking at the Project, but I was making an avi to show what could be done, and 1 frame of an effect goes by kinda fast, so I wrote this script to help out. Say for example I had a layer that had 20 frames, each with a different image in it. When you play that back it goes by too fast to notice. I wanted each frame to stay on for at least a second each (30 frames), so I had to find a way to duplicate each frame. I could use time stretch, but that blends the images together, and was not what i was looking for. I wanted the images to stay the way they were, just to stay on screen longer.

This script takes a layer and duplicates Each frame by a number selected by the user, so if you wanted each frame to stay on for 1 second, you would enter 30 for the number of Frames. It works on the current layer and only on the frames you have selected, so if you want to do the whole layer, do a "Select ALL" first. If you only need 10 frames, in the middle, just select them first, then run the script.

You can go to the bottom of the page from here and click on the link to download this script, or follow along now as we break down the script, to show you how it does what it does. The acutal script is between the start and end George script lines. My comments will look like this < --- Comment Goes Here --- > and are not actually part of the script itself.

< ---------------------------------- Start of George Script ----------------------- >
// Duplicate Frames
// By J.L. White
// (C)2000 Visual Inspirations Inc.
< --- The first 3 lines are just comment lines. Anything that starts with // is a comment --- >

Param none
connect Aura Commands
< --- Tells Aura what options to use, like rectangle, circle, for this we need none --- >

tv_ReqNum 1 1 10000 "Enter Number Of Frames To Duplicate!"
TNum = result
if CMP(TNum,"Cancel") == 1
   tv_Warn "Delete Frames Aborted!"
   exit
end
< --- Get Total number of Frames to duplicate and exits if user hits "Cancel" --- >

tv_LayerCurrentID
parse result FirstLayer
tv_LayerInfo FirstLayer
parse result LayerDisplay LayerPosition LayerDensity LayerName LayerType LayerStartFrame LayerEndFrame LayerTable
< --- Get info about Current Layer --- >

tv_LayerSelectInfo
parse result FirstFrame NumSelectedFrames
< --- Gets info on what frame the Layer Starts on and Total Frames --- >


CurrentFrame = FirstFrame
tv_LayerCreate "" < --- Creates a New Layer --- >
tv_LayerAnim < --- Converts Layer to an Anim Layer --- >
tv_LayerCurrentID
parse result DupLayer < --- Sets ID for New layer --- >
for i = FirstFrame to (FirstFrame+NumSelectedFrames)-1
   tv_LayerSet FirstLayer < --- Sets original Layer as Current --- >
   tv_LayerImage CurrentFrame < --- Sets 1 Frame at a time --- >
   tv_LayerSelect CurrentFrame 1 < --- Selects that frame --- >
   tv_LayerCopy < --- Copies that Frame --- >
   tv_LayerSet DupLayer < --- Sets New Layer as Current --- >
   CurrentFrame = CurrentFrame+1
   tv_LayerInfo DupLayer < --- Gets info on New layer --- >
   parse result LayerDisplay LayerPosition LayerDensity LayerName LayerType LayerStartFrame2 LayerEndFrame2 LayerTable
   tv_LayerSelect LayerEndFrame2 1 < --- Selects Last frame --- >
   tv_LayerPaste < --- Pastes Copied frame --- >
   if i == (FirstFrame+NumSelectedFrames)-1
      TNum = TNum-1
   end
   tv_LayerStretch DupLayer End TNum Last < --- Stretches layer duplicating the Last frame to match the user selected number --- >
end

exit
< --- Exit the script --- >
< ---------------------------------- End of George Script ----------------------- >



Click Here to Download DupFrames.zip


Well that does it for this one, till next time...


To contact Jeff White you can E-Mail him at jeff@vionline.com

Back To The Tutorial Page
Copyright © 2000 Visual Inspirations