Creating on/off buttons, Making a parameter non-animateable – Apple Shake 4 User Manual

Page 385

Advertising
background image

Chapter 14

Customizing Shake

385

nuxDefExprToggle(“Func.parameter”,

“repl.nri|repl.focus.nri”,
“interp.nri|interp.focus.nri”,
“blur.nri|blur.focus.nri”

);

This assigns a series of buttons to toggle through integers starting at 0. The first line is
assigned a value of 0, the second line assigned a value of 1, the third assigned a value
of 2, and so on. You can place as many toggles as you want. There are two buttons for
each assignment, the normal button, and a second button for when the pointer passes
over the button to signify that you can press it. Note the standard buttons are all in the
subdirectory ux, but this is not a requirement. Shake includes a series of precreated
icons that are packed into the icons.pak file and are inaccessible to the user, but are
understood by this code. Your custom icons can be any size, but the default height is 19
pixels. You cannot have an alpha channel attached to an icon. Use SetAlpha (set to 0) or
Reorder (set to rgbn) to remove the alpha channel. They can be placed in
<ShakeDirectory>/icons, the $HOME/nreal/icons, or $NR_ICON_PATH.

Creating On/Off Buttons

In the ui directory:

nuxDefExprToggle(“Func.param”);

This is similar to the push-button toggles, but you only have two values, on and off—
off a value of 0, and on a value of 1. The icon assignment is automatic.

Making a Parameter Non-Animateable

In the ui directory:

nriDefNoKeyPControl(“DilateErode.soften”);

This designates that no Autokey buttons appear.

Advertising