FrameAliasMC
(LScript version 2.3) BRIEF This enables you to associate a string (or text) to a specific frame and enables jumping from one particular frame to another. FrameAliasMC's primary use is to label specific frames for other motions to adhere to. This is readily useful in lip-synching or coordinating sound effects with animation: the audio remains fixed and the animation must coincide with it. In effect, FrameAliasMC acts as an internal dopesheet with comments, as it were.
INTERFACE The interface is resizeable and is made as small as possible, by default, so that it does not become a cumbersome panel to work with. At the top there are the Add, Rem, File, and Goto buttons, and the Frame input field. The second row contains the Alias input field.
ADDING ALIASES There are two ways to add aliases. Both involve typing in an alias in the Alias field. They differ, however, in the Frame input. Way # 1: While the GoTo button is activated (e.g. highlighted) move your frame slider to a frame, say, at frame 10. You will notice that the value in the Key input field will reflect your current frame. Type in an alias, if you havent yet, and press the Add button. You will see the frame number and the alias in the listbox separated by a long series of dashed lines. Way # 2: Another way of creating an alias is by deactivating the GoTo button. When this is deactivated, the Key input field will no longer update to the current frame. This means that you can manually input multiple frames and put them all at once. In the Key input field type in "5 2 8 35" or something similar (disregard the quotation marks). Do note that the numbers must be separated by a single whitespace. Avoid using decimals or other characters. Type in an alias and press Add. You will see that the numbers are sorted in the list. One important note: when inputting aliases, you must not use any whitespace. If you want to separate words, use the "_" character as in "ball_hits_ground", or the camel notation like "ballHitsGround", or anything for that matter. Just avoid whitespace. If you do include whitespace then the script will extract only the first token, ignoring the rest.
REMOVING ALIASES This is easy enough. Select a slot, or multiple slots in the listbox, and press Rem. This will delete your selection(s).
RENAMING ALIASES Renaming capabilities come in the form of replacement. Type in the Frame input field the frame you wish to rename, type in the new alias and then press add. Because the script does not allow for identical frames in the list, it simply replaces the old frame alias with the new one.
THE GOTO FUNCTION The GoTo state button has two functions, one of which was already stated above: that is, it tracks Layout's frame slider and updates FrameAliasMC's interface to match it. The second function is where it derived its name in the first place. With the GoTo state button activated, selecting any entry in the list will make the Layout's time slider jump to the particular frame.
USING LAYOUT'S NEXTKEY / PREVIOUSKEY I've made it possible to map Layout's NextKey and PreviousKey commands into the script so that invoking a NextKey (Shift + Right Arrow) or PreviousKey (Shift + Left Arrow) will actually scroll down the FrameAliasMC's list of the frames rather than the selected item's keyframes. To activate this component, activate the File state button and click on O/R Layout NextKey/PrevKey (e.g. O/R == override). Pardon the location of this button as I had imposed on myself some space constraints; I wrote this is script to fit to my animating methods which are apprehensive to big floating windows.
FILE SAVING AND LOADING We come the last part. Ordinarily, FrameAliasMC will save your frame aliases along with the scene file. However you might also want to save and/or load certain alias lists between related scenes. Just click on File and then click on Sv or Ld (Save or Load) and enter a filename. Be sure to enter an extension as the script will not do it for you. Additional notice: as of this first release I have included a Magpie 1.x compatible text parser into the script. If you use Magpie, just click on File > Export > Magpie 1.x compatible and it will prompt you to save your comment sheets out to a text file. This is can then be opened directly from within FrameAliasMC and immediately loaded into the listbox. Some words of caution: do not create keys, spline curves, or expressions in Magpie when you export. The only thing that the parser can detect are the frame numbers and the user comments. In effect, we're using Magpie as a timing sheet maker. FrameAliasMC will only create frame aliases for those frames that have comments. If you make a mistake and create keys, curves, or expressions in Magpie, the parser might not interpret the file correctly. Lastly, all comments inputted in Magpie will be reformatted in such a way that it replaces whitespace characters (" ") with underscore ("_") characters. This is to keep FrameAliasMC from croaking.
KNOWN BUGS There is an weird bug, at least in my system where I have tested it, in which the script will crash LightWave if the script is loaded, had its panel opened, has had a frame aliases created and subsequently closed using the the X close window button on the upper-right hand of the window. You can counter this bug by NOT clicking on that bloody X button! Instead press ESC once or twice. After the first closing, the X button will sometimes not crash LightWave. But I highly recommend using the ESC to close the panel at any given time.
***APPENDANT (11.02.02)*** Just a tiny code change in relation to the bug listed in KNOWN BUGS about requester-related crashing. The window will now close more reliably.
|