Scripting controls – Apple Shake 4 User Manual

Page 952

Advertising
background image

952

Chapter 31

Expressions and Scripting

See Tutorial 8, “Working With Macros,” in the Shake 4 Tutorials for information on
making macros interactively or in a script.

Scripting Controls

To generate a test script, go to the

Tutorial_Misc/truck/ directory within the

Tutorial_Media directory. Enter the following command to create a script and save it as
start.shk:

shake truck.iff -outside sign_mask.iff -over bg.iff -savescript

start.shk

The truck is composited over the background, with the sign mask as a holdout mask,
and a script named start.shk is saved. The composite itself is unimportant, but the tree
structure is important. The following image shows how the script appears in the
interface.

To test the script result from the command line, type the following:

shake -script start.shk

The image of the truck is composited over the street image. The following is the code
for the script itself:

SetTimeRange(“1”);
SetFieldRendering(0);
SetFps(24);
SetMotionBlur(1, 1, 0);
SetQuality(1);
SetUseProxy(“Base”);
SetProxyFilter(“default”);
SetPixelScale(1, 1);
SetUseProxyOnMissing(1);
SetDefaultWidth(720);
SetDefaultHeight(486);
SetDefaultBytes(1);
SetDefaultAspect(1);
SetDefaultViewerAspect(1);
SetTimecodeMode(“24 FPS”);
SetDisplayThumbnails(1);
SetThumbSize(15);
SetThumbSizeRelative(0);
SetThumbAlphaBlend(1);

Advertising