beautypg.com

Apple Shake 4 Tutorials User Manual

Page 228

background image

228

Chapter 8

Working With Macros

To test the effect:

1

Load the Rotate2 parameters into the Parameters tab.

2

Adjust the angle parameter.

The blurring rotates, but the text stays in the same spot. If the Rotate2 angle parameter
is 67 degrees, then the Rotate1 angle is –67.

If the effect is not working for some reason, don’t sweat it—delete your Rotate and Blur
nodes, select and copy the following text (press Command-C or Control-C), then paste
it into the Node View (press Command-V or Control-V):

Rotate1 = Rotate(0, -Rotate2.angle, 1, width/2, height/2, 0, 0.5, 0);
Blur1 = Blur(Rotate1, 200, 0, 1, "gauss", xFilter, "rgba");
Rotate2 = Rotate(Blur1, -36.9218, 1, width/2, height/2, 0, 0.5, 0);

Because Shake is a compiler, you can copy nodes from text and paste the text into the
interface.

Save the script for later use:

m

Choose File > Save Script As and save the script as rotateblur_tree.shk.

You are now ready to start creating the macro. By default, Shake places macros,
preference settings, and interface modifications in your $HOME directory (for example,
Users/john). In the following steps, you will add a series of subdirectories to the $HOME
directory using the Terminal application.

To make the macro:

1

Open Terminal, found in the Applications/Utilities directory.

2

Type:

mkdir -p $HOME/nreal/include/startup/ui
mkdir -p $HOME/nreal/icons

Note: You can add files to other directories as well using an environment variable. For
more information on setting environment variables, see in Chapter 14 of the Shake 4
User Manual
.

3

Launch a text editor (TextEdit, vi, emacs, or the like).

Warning:

Do not modify Rotate1, because that will break the link to Rotate2.