Apple Shake 4 User Manual

Page 936

Advertising
background image

936

Chapter 31

Expressions and Scripting

For example, the Move2D node links the yScale parameter as equal to the xScale
parameter by default. To show the expression editor, enter any letter into the value
field, then press Return. A plus sign appears next to the parameter. Click the plus sign
(+) to expand the parameter and enter your expression.

To link to a parameter within a different node:

m

Enter the node name, followed by a period, followed by the parameter name. For
example:

node.parameter

In the following example, the value parameter is linked to another value parameter
from the Fade1 node, and multiplied by 2.

You can declare a variable anywhere within a script. However, to make the variable
available in the interface, you must precede it with the curve declaration:

curve parameter_name = expression;

For example, use the following to declare the my_val variable for the above example:

curve my_val = 1;

To clone a node in the Node View:

1

Copy a node.

2

Do one of the following:

Right-click in the Node View, then choose Edit > Paste Linked from the shortcut
menu.

Press Shift-Command-V or Shift-Control-V.

This links all parameters in the cloned node to those of the original. The cloned
parameter is named with the original node’s name, followed by “_clone” and a number
if there is more than one clone in the node tree.

Important:

When you modify any parameter in a cloned node, its link to the original

node is broken, so be careful when making adjustments with onscreen controls.

Advertising