beautypg.com

Copying text into the node view – Apple Shake 4 Tutorials User Manual

Page 229

background image

Chapter 8

Working With Macros

229

4

In Shake, drag to select the Rotate1, Blur1, and Rotate2 nodes in the process tree.

5

Press Command-C or Control-C to copy the nodes.

Note: You can also select Copy with the right-click shortcut menu in the Node View.

6

In the text editor, paste the nodes (press Command-V or Control-V).

The Shake source code is pasted into the editor, and it looks something like the
following:

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

// User Interface settings

SetKey(
"nodeView.Blur1.x", "290",
"nodeView.Blur1.y", "227",
"nodeView.Rotate1.x", "290",
"nodeView.Rotate1.y", "263",
"nodeView.Rotate2.x", "290",
"nodeView.Rotate2.y", "191"
);

If you already know C programming, you may want to jump down to the finished
macro; otherwise, keep reading.

Copying Text Into the Node View

If you copy the first two lines in the text editor:

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

you can paste it back into the Node View.

This demonstrates that you can copy between script and interface.