File name versus macro name, Loading image macros into the interface – Apple Shake 4 User Manual
Page 917
![background image](/manuals/547483/917/background.png)
Chapter 30
Installing and Creating Macros
917
Type:
shake -help softglow
to return:
-softglow [blur] [lowClip] [hiClip] [percent]
Loading Image Macros Into the Interface
When you start the Shake interface, the macros do not appear in the interface. A
separate file and set of functions are required to load the macros in the interface. These
ui functions are saved in a subdirectory of startup called ui. The following ui code
creates a button in the Filter tab with no icon that is labeled “SoftGlow,” and calls up
the SoftGlow function when clicked. Save it in $HOME/nreal/include/startup/ui or
$NR_INCLUDE_PATH/startup/ui. You can also find a copy of this in doc/html/cook/
macros called SoftGlowUI.h.
nuiPushMenu(“Tools”);
nuiPushToolBox(“Filter”);
nuiToolBoxItem(“@SoftGlow”,SoftGlow());
nuiPopToolBox();
nuiPopMenu();
The @ sign indicates that no icon is associated with the button. If you have an icon,
omit the @ sign (do not add the tab prefix or image type extension) and save an icon
image, 75 x 40 pixels in size, in your icons directory (
icons
step, see Tutorial 8, “Working With Macros,” in the Shake 4 Tutorials.
The images for the icons have the following characteristics:
•
75 x 40 pixels
•
No alpha channel
•
Named as TabName.FunctionName.nri
When calling the icon in the ui.h file, omit the TabName. and .nri.
•
Font: 1-point Arial
•
Saved in
File Name Versus Macro Name
Names of files have nothing to do with names of macros. Only the function name is
important when called in the script. You can also have multiple macros per file.