Creating a node without an icon – Apple Shake 4 Tutorials User Manual
Page 236

236
Chapter 8
Working With Macros
Important:
Shake assumes you have matched the tab name with the file name, so if
you actually did place this into the MySwankFunctions tab, you have to rename the
icon file on your disk to MySwankFunctions.RotateBlur.nri.
The next part of the code, RotateBlur(0,0,0), is the function call, followed by its default
values. Because Shake does not know what image it is attached to (until you actually
press it), place a 0 as the first (image) variable. The second and third zeroes set the
angle and blur parameters to 0. The third line closes up the tab.
11
Save the text file as rotateblur_ui.h in your $HOME/nreal/include/startup/ui directory.
12
This directory contains all instructions to modify the interface.
13
Launch Shake.
In the Filter tab, the new RotateBlur button appears.
If there is a problem, check the following list:
•
If you only see the “Missing Artwork” icon, it means Shake cannot find the icon for
some reason. Make sure the icon is named <TabName>.
in the $HOME/nreal/icons directory. Make sure that the spelling and capitalization of
the file name and the call to the file match.
Creating a Node Without an Icon
If you do not have an icon, create a plain button with text on the button by placing
an @ sign before the word:
nuiToolBoxItem(“@OopsNoIcon”,RotateBlur(0,0,0));
As this example shows, the button name can differ from its actual function.