Terminal shortcuts for repeating commands, Adding a button to the interface, Color correct the foreground element – Apple Shake 4 Tutorials User Manual
Page 234

234
Chapter 8
Working With Macros
Now try your new macro on an image. If you do not have an image, use the sample
image in the $HOME/nreal/Tutorial_Media/Tutorial_08 directory.
To test your new macro on an image in the Tutorial_08 directory:
1
In the Terminal, type the following:
cd nreal/tutorial_media/tutorial_08/images
The “cd” command at the beginning of the line tells Terminal to change directories to
the specified path—in this case, the Tutorial_08/images directory.
2
Press Return.
Terminal changes directories according to the specified path.
3
At the command-line prompt, type any of the following commands (or cut and paste
them, if you are reading the onscreen version of this tutorial):
•
shake traffic_bg.jpg -rotateblur
•
shake traffic_bg.jpg -rotateblur 100 300
•
shake traffic_bg.jpg -rotateblur "Linear(1,0@1,360@11)" 200 -t 1-10
•
shake traffic_bg.jpg -rotateblur "Linear(1,0@1,360@11)" 200 -gui
The “Linear...” used for the angle of the blur is an animation curve, using a Linear
format. The first “1” indicates the curve is extended into infinity. The second set of
numbers indicates you have a value of 0 at frame 1, and then a value of 360 at frame 11.
The last command launches the tree into the interface. You can see your new
RotateBlur node in action. However, you still cannot actually click anything to create a
second node. For that, you need to create a button and attach an icon.
Adding a Button to the Interface
This section shows you how to create a button in the interface and attach a node to
the button. The icons for the tabs have two qualities:
•
The icon size is 75 x 40 pixels.
•
The icons are saved in the nreal/icons directory as TabName.Name.nri.
To make an icon with which to apply the RotateBlur function:
1
In Terminal, type the following:
shake -addtext RotateBlur -rotateblur -gui
The text is launched in the interface with your RotateBlur node attached.
2
Attach a Transform–Fit node to the RotateBlur1 node in the Node View.
Terminal Shortcuts for Repeating Commands
If you press the Up Arrow key, the last command typed in Terminal is repeated. Press
the Up Arrow again to list the previous command on the list, and so on. Use the Left
Arrow and Right Arrow keys to edit the command.