Visualization Guide
Visualization Guide
Visualization Guide

Working with Scripts

The Animation Producer dialog box's File menu contains items for working with scripts.

Choose:

To:

Open Script…

Open an existing script.

Include Script…

Include an existing script in the open script (see Including scripts).

Scale Script…

Apply a multiplier value to the open script (see Scaling scripts).

Clear Script…

Clear all entries in the open script.

Save Script

Save the open script to disk with the current filename, and a .scr extension.

Save Script As…

Save the open script file to disk with a different name.

Record Script…

Record a script, using the open script file.

Continue Recorded Sequence…

Continue recording a script on a networked system or a recording that was aborted.

Record Selected Frames…

Record selected frames in the sequence.

Motion Blur

To exaggerate the motion blur effect in a sequence.

Exit

Close the Animation Producer dialog box.

Script entries from the open script file can be edited from within the MicroStation environment, or manually with a text editor.

To edit a script
  1. In the list box in the Animation Producer dialog box, double-click a script entry you want to edit.
    The appropriate dialog box opens (for example, Edit KeyFrame, Edit View, or Edit Actor).

  2. Change any of the parameters to the desired values.
    or
    To disable the entry, turn on Disabled.

  3. Click the OK button to accept the changes.
    or
    Click the Delete button to delete the entry.
    or
    Click the Cancel button to cancel the changes.

  4. (Optional) For each additional entry you want to edit, repeat steps 1-3.

    Double-clicking a script entry in the Animation Producer dialog box, opens the appropriate Edit dialog box.

      

  5. Conflicts between enabled script entries only are checked. When a conflict is found, an alert box gives you the option of overwriting the existing entry or disabling the new entry. Disabled entries are indicated in red in the Animation Producer dialog box.

You can edit script files manually, using an ASCII text editor. The format of the script file is similar to material palettes. The simple example below shows how the script files are constructed.

Top section: Header information, showing the view to be used, the script scale, and any defined parameters.

Middle section: Script for actor BOX1, showing that the actor is to rotate about the z-axis A1 degrees per frame.

Bottom section: Script for actor CYL1, showing that the actor is to rotate about the x-axis at twice A1 degrees per frame.

Scaling scripts

Where necessary, you can define a multiplier value to be applied to the open script. This is useful for sizing an animation to run for a predetermined time or adding frames to smooth motion.

To scale a script
  1. From the Animation Producer dialog box's File menu, choose Scale Script.
    The Scale Script dialog box opens.

    Choosing Scale Script from the dialog box's File menu opens the Scale Script dialog box.

      

  2. In the Scale field, key in the scale factor.
    The resulting frame count is computed by multiplying the scale factor by the difference between the starting and ending frame numbers. For instance, a script with frames 0 through 10 and an applied scale factor of 2 will go from frame 0 to 20. You can also shorten a script by entering a value of less than 1 (but greater than zero).

  3. Click the OK button.

Caution is required when scaling a script that contains parametric motion control (that is, referencing specific frame numbers).

The scale factor is not cumulative. To restore a script to its original scale, simply reset Scale to 1.0.

Including scripts

Previously created scripts can be included in the open script. For example, you may have created and scripted a clock actor, with moving hands and pendulum, in a previous design. Rather than create a new animated clock, you can copy this actor into the new design, and then include the script. Alternatively, if you have created a new clock, you simply give the actor(s) the same name(s) as in the original, and then include the script of the original clock.

To include an existing script in the open script
  1. From the Animation Producer dialog box's File menu, choose Include Script.
    The Include Script dialog box opens.

  2. Select the script file to include.

  3. Click the OK button.
    The first Include Script dialog box closes, and a second one opens.

  4. In the Begin Frame field, key in the frame number, within the open script, at which the included script is to begin.

  5. In the Repeat Count field, key in the number of times that the script is to be repeated.

  6. In the Scale field, key in the scale factor to apply to the script (and to all scripts included within that script). For more information, see Scaling scripts.

  7. Click the OK button.
    The Include Script dialog box closes, and the script entry is added to the list in the Animation Producer dialog box.

All animation sequences are assumed to start at frame number 0. If you are using an older script that started at frame number 1, you can use the key-in ANIMATOR SCRIPT ADJUST to adjust the script by subtracting 1 from all the frame numbers. Only use this key-in once.

You should check to ensure that parametric scripts are still correct after the adjustment.