Tips – Apple Shake 4 User Manual

Page 1029

Advertising
background image

Appendix A

The Shake Command-Line Manual

1029

Tips

The following section contains tips and tricks for command-line usage.

File Completion

The following is a shortcut to typing file names using the file completion feature in the
shell. When you press Tab, all potential files that match what you type are listed. For
example:

shake Tab

lists

shake truck/

Press Tab again to list all three image files within that directory. If you type another “t,”
that is:

shake truck/Tab

lists

shake truck/truck.iff

Therefore, you can type the entire line with very few keystrokes. If you type the
following:

shake Tab Tab Tab Tab Tab

shake truck.iff -pan
“cos(time*.5)*100” “sin(time)*50” -
motion .5 1 -t 1-13

Uses the cos and sin functions to animate the truck in a
figure eight.

shake bg.iff -rotate
“cos(time*.5)*50+25” -t 1-13 -
motion .5 1

Substituting Values with -curve

If you have the following in a script called myscript.shk:

Text1 = Text(720, 486, 1, {{ stringf(“myVal = %d %s”, myVal, slatestring); }}, “Utopia Regular”, 100, xFontScale,
1, width/2, height/2, 0, 2, 2, 1, 1, 1, 1, 0, 0, 0, 45);

you substitute values in with the -curve option:

shake -curve int myInt 5 -curve string slatestring “SuperSlate” -script myscript.shk

and you get a nice image that says “myVal = 5 SuperSlate”.

Or you can use:

shake -curve int myVal 5 -curve string slatestring “SuperSlate” -text 720 486 1 ’ :stringf(\\\“myVal =
%d\\n%s\\\”, myVal, slatestring ) ; ’

Note the extra backslashes: This quotes it once for the shell and then again for Shake. The shell sees \\
and makes it \ then \“ and makes it so you get a result of \“ going into the Shake wrapper script, that
is then passed properly into the Shake executable. Whew.

Animating Parameters

Description

Advertising