beautypg.com

Creating macros with macromaker, Tutorial summary – Apple Shake 4 Tutorials User Manual

Page 238

background image

238

Chapter 8

Working With Macros

This sets the slider range from 0 to 400 for the blur parameter of the RotateBlur
function. Spelling and capitalization are important, which is why that tiresome rule
explained earlier starts to make sense.

You do not have to set a range for angle, because it is already set between –360 and
360 in the default Shake setup files. To change the angle slider range, duplicate the blur
line and modify it to say angle. This example sets it from 0 to 180:

//These set the slider ranges for the blur parameter
nuiDefSlider("RotateBlur.blur", 0, 400 );
nuiDefSlider("RotateBlur.angle", 0, 180 );

2

Save your file, then launch Shake again.

The sliders are now set to 0 to 400 and 0 to 180.

For more information on customizing parameters, see Chapter 14, “Customizing Shake,”
in the Shake 4 User Manual.

Creating Macros With MacroMaker

This next section of the tutorial duplicates your labor by using the MacroMaker. It is a
fast way of creating reusable macros, but it is important to understand the files it
creates so that you can modify them. Creating the macro by hand (above) helps
demystify the process that the MacroMaker follows.

To create a macro with the MacroMaker:

1

Open Shake, and, if you followed the above parts of the tutorial, load the script you
created called rotateblur_tree.shk.

Note: If you do not have this script, copy and paste the following code into the Node
View:

Text1 = Text(300, 200, 1, "Text", "Courier", 100,xFontScale, 1, width/2,

height/2, 0, 2, 2, 1, 1, 1, 1, 0, 0, 0, 45);

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