|
This script came about by working with a ton of still images. I needed to load them all in and then convert them all to anim layers. This will help speeds things up. First the process. First you load an image, which creates a new layer, then you turn it into an anim layer, then you add your required number of frames. But what is you had 10, or 20 frames you needed to do this to? Well AnimLayer.grg to the rescue. All you have to do is load the images in, and the script will do the rest. It asks you if you want to make all the layers the same length and if so, it asks for that number, then it takes over and does ALL the layers for you. If you need each to be different lengths, then it will ask as it goes. Short and sweet, but a real time saver if you work with a lot of images. 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 ----------------------- > // Make Anim Layers // Written By J.L. White // (C)2000 Visual Inspirations Inc. < --- The first lines are just comment lines. Anything that starts with // is a comment --- > DefaultNum = 30 < --- This is the default variable for how many frames to create --- > tv_Request "Do You Want To Make All Anim Layers The Same Length!| Same Length | Different Lengths " SameNum=result if SameNum == 1 tv_ReqNum DefaultNum 0 10000 "Enter Number Of Frames For All Layers" LayerNum = result-1 end < --- Asks if it should use 1 number for All or ask on each layer --- > i=0 do tv_LayerGetID i i = i+1 MyID(i) = result Until (CMP(MyID(i),"none") == 1) Total = i-1 < --- Finds out how many layers are in the project --- > for i = 0 to Total-1 tv_LayerGetID i parse result CurrentLayer < --- Gets info on current layer --- > tv_LayerSet CurrentLayer < --- Set current layer as default --- > tv_LayerInfo CurrentLayer parse result LayerDisplay LayerPosition LayerDensity LayerName LayerType LayerStartFrame LayerEndFrame LayerTable < --- Get info about current layer settings --- > CheckAnim = CMP(LayerType,"IMAGE") if (CheckAnim == 1) if SameNum == 0 tv_ReqNum DefaultNum 0 10000 "Enter Number Of Frames For Layer" LayerNum = result-1 end < --- If set to ask, it will ask on each layer for length --- > tv_LayerAnim < --- Make it an Anim layer --- > tv_LayerStretch CurrentLayer END LayerNum < --- Stretch the layer out to use selected length --- > end end tv_Warn "Script Is Now Complete!" < --- Tell user we are done --- > exit < --- Exit script --- > < ---------------------------------- End of George Script ----------------------- > Click Here to Download MakeAnim.zip Well that does it for this one, till next time... |
Back To The Tutorial Page
Copyright © 2000 Visual Inspirations