Setting Preferences and Customizing Shake

This page has six sections:

 

   Where to Put .h Files and Custom Icons

Preference Files Search Path

You can create your own preference files to either add to or change Shake's performance. To add your own files, create the following directory subtree:

<somewhere>/include/startup/ui.

"Somewhere" can be one or more of three possible locations (searched in the order they are listed below):

Files that change performance or add macros (see below) are always located in <somewhere>/include/startup, and have a .h file extension, i.e.,

/usr/people/me/nreal/include/startup/memory_settings.h

I refer to this directory in the documentation as the startup Directory, or as $NR_INCLUDE_PATH/startup.

Files that change the interface in some way (see below) are always located in <somewhere>/include/startup/ui, and have a .h file extension, i.e.,

/usr/people/me/nreal/include/startup/ui/slider_settings.h

I refer to this directory as the ui Directory, or as $NR_INCLUDE_PATH/startup/ui.

Files that change additional default settings or add extra controls are in the templates directory, which is always under a ui directory:

/usr/people/me/nreal/include/startup/ui/templates/defaultfilter.h

All of these files can have any name, except "nreal.h" or "nrui.h", which are reserved files used by Shake as the standard list of functions and settings. Also, they must have the .h extension, so a fast way of disabling a file is to remove the extension.

Within a startup or startup/ui directory, files are loaded in no specific order. If it is important that a file gets loaded before another one, this can be accomplished by either:

Include files are never loaded twice, so it's OK if two .h file contain the same #include <somefile.h> statement.



Icons Search Path

Just as you can create preference files, you can also create your own icons to be used. The description of the actual icons can be found below on the section on Changing the Interface. Icons can be found in one of 3 locations:

 

   startup Files

Shake comes with two important files in the <ShakeInstall>/include directory, nreal.h and nrui.h. The first file, nreal.h, lists out every single function and all of the default performance settings. This file should not be touched by the user, but may be read for reference on formatting. The commands found in this file can be copied and modified and placed in your startup Directory. The second file, nrui.h, contains all of the information to build the entire interface. It assigns menus names and listings, tabs, buttons, slider settings, every function connected to these items, and all of the default settings when they are called up in the GUI. The commands in this file can be copied and modified and placed in your ui Directory. As with the nreal.h file, you shouldn't modify this file, with one exception, which is listed below in ui Preference Files.

The following items are set in your startup Directory (see above), in any file ending with a .h (except the reserved names nreal.h and nrui.h). All of these commands can normally be found in the nreal.h file. I usually create one file for machine settings, and one file per macro. Simply add the lines to a file and save it. I have included the default values in the listings here. The // means that line is commented out and inactive.

A Sample Macro  
image AngleBlur(image input, float angle = 0, float blur = 200)
{
 R1 = Rotate(input, -R2.angle, 1, width/2, height/2, 0, 0.5, 0);
 B1 = Blur(R1, blur, 0, 1, "gauss", xFilter, "rgba");
 R2 = Rotate(B1, angle, 1, width/2, height/2, 0, 0.5, 0);
 return R2;
}

This simple macro creates a blur at any angle that you set. We have declared it as an image macro, i.e., it will spit out an image, rather than a float, int, or string, and that its name is AngleBlur. In between the normal parentheses, we have declared three variables, input, angle and blur. input is an image variable, the others are floats (meaning a number with a decimal point). Then, in the curly parentheses, we have the body of the macro. The variable blur has been plugged into the xPixels parameter of Blur, and angle has been plugged into the angle parameter of R2, the second Rotate. input is declared to pass into the first Rotate command, R1. Finally, we are ensuring that R2 is output from the macro by assigning it to the return command. For more information, see the GUI tutorial.

 

Setting Memory Usage  
cache.cacheMemory = 64;
diskCache.cacheMemory = 64;

These controls determine your memory allocations for rendering. See About Caching for detailed information.

 

Setting Cache Controls  
// diskCache.cacheLocation = "/var/tmp/Shake/cache";     
// for IRIX
// diskCache.cacheLocation = "c:/temp/Shake/cache"; 
// for Windows NT 
// diskCache.cacheMaxFile = 2048; 
// diskCache.cacheMaxFileSize = 2048*2048*4*2; 
diskCache.cacheSize = 512;        

These lines control the size and location of the cache. By having different cache location files, and pointing to them with NR_INCLUDE_PATH, you can have multiple cache locations, based on different shots or projects.

  • cacheLocation lines are the default locations. Uncomment them and change the path to move the location of the disk cache to a different directory.
  • cacheMaxFile is the maximum number of files in the cache.
  • cacheMaxFileSize is the maximum file size, written as width*height*channels*bytes. Therefore, if you are working on a float 4k Imax piece, you would want to change this to 4096*4096*4*4.
  • cacheSize is the maximum amount of disk space taken by the cache. If a cached file will expand the cache beyond this limit, the oldest files are removed.

For more information on caching, jump to About Caching.

For information on tmp files created by Shake when rendering, jump to About I/O.

 

UNC File Path Naming Convention  
script.uncFileNames = 1;

When Shake reads in a file, it will automatically convert it to the UNC naming convention of //DeviceName/path....To turn this off, set this value to 0, which will give you the regular path to your image. Note that either mode recognizes and retains local file paths, i.e., ../pix/my_image.iff.

 

Default Frames Per Second  
script.framesPerSecond = 24;

To override this, use the framesPerSecond in the Global Parameters, or with -fps in the command line. You can also change the playback speed of a flipbook with the NumPad +/- keys - the fps is displayed in the title bar.

 

Default Video Resolution (for Shake Video)  
// Valid resolutions are:
// "NTSC 640x480"
// "NTSC 720x486"
// "PAL 720x576"
// "PAL 768x576" 
script.videoResolution = "NTSC 640x480"; 

This sets the default ouput resolution for the Shake Video version. This is different from the defaultWidth and defaultHeight, which regulate the creation resolution of nodes like Grad and Ramp.

 

Assigning the default width or height to a parameter  
image Black(
  int width=GetDefaultWidth(),
  int height=GetDefaultHeight(),
  float aspectRatio=GetDefaultAspect()
)

These three commands will check the default global settings and return the value at the time of node creation; they are not dynamically linked. Therefore, if you change the default parameters, the node's values will not change.

Setting the default amount of processors  
sys.maxThread = nrcGetAvailableProcessors();

This sets the default number of processors you assign to Shake when running it interactively. You can either use a number, or use the default command which automatically assigns all availalbe processors to Shake. In the command-line mode, use the -cpus option, i.e.,

shake -exec my_script.shk -cpus 4

 

Cineon/Tiff Format Writing  
script.cineonTopDown = 1; 
script.tiffTopDown = 1; 

Shake can support writing Cineons (.cin) and Tiff (.tif) either bottom-up or top-down. It is much faster to write from the bottom up, which would have a value of 0. However, most other software packages do not properly support the bottom-up version, so we set the default to the slower top-down method by setting this value to 1.

 

Setting Jpeg Image Quality  
jpeg_quality=100;

Sets the jpeg quality, 100 meaning 100% quality. You can also set an environment variable, jpeq_quality in a .tcshrc file.

 

Defining Custom Kernels  
DefKernel( "smoothedge", 5, 5, 1, 0, -0.0625, 
  -0.125, -0.25, -0.125, -0.0625, -0.125, 
  -0.25, -0.5, -0.25, -0.125, -0.25, 
  -0.5, 5.0, -0.5, -0.25, -0.125, 
  -0.25, -0.5, -0.25, -0.1251, -0.0625, 
  -0.125, -0.25, -0.125, -0.0625 
);

You can define your own kernel with the DefKernel command. These kernels will then be automatically listed in the Filter - Convolve kernel list next you launch Shake. For more information on the kernel format, jump to Convolve.

 

Lightweight GUI Mode
sys.hardwareType = 1;

This command opens Shake without any borders on buttons, making the interactivity a little faster for graphically slower machines, like an O2. A value of 0 means the normal mode, a value of 1 gives you the lightweight mode.

 

   

 

If they do not appear to be working, refer to the following check list:

 

   ui Files

 

These files control the way the interface looks, but don't effect actual images themselves. A good test to see if a setup command should go into the startup Directory or the ui Directory is to ask yourself "Does this command change the image in some way, or does it make sense in a command-line mode?" If the answer is "Nope", then it is probably a ui Directory command. All of these commands go in a file with a .h ending in your include/startup/ui directory.

AutoSave frequency  
script.autoSaveDelay = 60;

How often the autoSave script is done in seconds. The script is saved automatically in your User Directory as autoSave1.shk, autoSave2.shk, etc, up to autoSave5.shk. It then recycles back to 1. If you lose a script due to a crash, you can load in the autoSave script.

 

Default Node View Zoom
gui.nodeView.defaultZoom=1;

Sets the default zoom level for the Node View.

 

Node Columns in a Tab  
gui.doBoxColumns = 8; // Number of columns in the dobox

Sets the number of columns for the nodes in the Tool Tabs, which we also sometimes call the Do Box. Unlike the other ui.h files, this must go in <ShakeDir>/include/nrui.h.

 

Creating a Tab/Placing A Macro with an Icon in A Tab
nuiPushToolBox("Filter");
nuiToolBoxItem("AngleBlur",	AngleBlur(0,0,0));
nuiPopToolBox();

This places an icon that you have created into a Tab that you assign. In this example, we have placed it into the Filter tab. If you use a custom name, i.e., My_Macros, it will create that tab. The second line first attaches the icon, and then assigns the function with its default arguments to that button. They do not have to be the same name, but both are case sensitive. The icon is either found in <ShakeDirectory>/icons, your <UserDirectory>/icons, or in any directory pointed to with $NR_ICON_PATH. The icons have the following characteristics:

  • Although they can be any size, the standard resolution is 75x40 pixels
  • No alpha channel. Assign a SetAlpha 0 or Reorder rgbn to remove the alpha channel.
  • The name is TabName.Whatever.nri. Our example would therefore be called Filter.AngleBlur.nri.
  • The rounded icon border is added automatically by Shake.

 

Creating a Tab/Placing A Macro without an Icon in A Tab
nuiPushToolBox("Filter");
nuiToolBoxItem("@AngleBlur",	AngleBlur(0,0,0));
nuiPopToolBox();

Note the @ sign before the icon name. This will simply create a button with whatever text you supply.

 

Grouping Parameters into a Sub-Tree
nuiPushControlGroup("MyFunction.timeRange");
    nuiGroupControl("MyFunction.inPoint");
    nuiGroupControl("MyFunction.outPoint");
    nuiGroupControl("MyFunction.timeShift");
    nuiGroupControl("MyFunction.inMode");
    nuiGroupControl("MyFunction.outMode");
nuiPopControlGroup();

This groups parameters into a subtree that can be opened and closed by the user.

 

Setting Default Palette Colors
nuiSetColor(1,1,0,0);
nuiSetColor(2,1,0.5,0);
nuiSetColor(3,1,1,0);
etc

Assigns default colors to the palette icons, with the first number being the button number.

 

Assigning Slider Ranges
nuiDefSlider("Move2D.yPan",     0,   height);
nuiDefSlider("angle",     -360,   360);
nuiDefSlider("aspectRatio",    0,   2, .2, .01);

Even though the sliders are relatively in the same position, there are different numbers in the textfields. You can set sliders ranges and precision with this function. The first line assigns a slider range just for the yPan parameter of the Move2D function. Note the nifty use of the height variable so the range will adjust according to the input image. The second line assigns a range for the angle parameter in any node. The third line also has optional precision parameters, which are granularity, and notch spacing.

  • granularity represents the truncation point. Shake will cut off all values smaller than your truncation value, i.e., if your granularity is .01, a value of .2344 will become .23. Granularity is a "hard" snap, i.e. if granularity is set to 0.001, you won't be able to get anything but multiples of 0.001 when you slide. Also, granularity can not be anything but a multiple of 10 (+ or -).

  • notch spacing represents at what value interval the magnets appear. A value of .1 means the magnets are at .1, .2, .3, etc. .1 is the default value. Notch spacing is a "soft" snap, i.e. the slider tends to stick longer to multiples of notchSpacing, but doesn't prevent you to select other values. Think of it as a tiny notch in a flat line where a ball rolls: the ball tends to get stuck in the notch, but if you keep pushing, it'll eventually get out.


Assigning the Color Picker to Three Parameters
nuiPushControlGroup("MyFunction.Color");
    nuiGroupControl("MyFunction.red");
    nuiGroupControl("MyFunction.green");
    nuiGroupControl("MyFunction.blue");
nuiPopControlGroup();
nuiPushControlWidget("MyFunction.Color",nuiConnectColorPCtrl(kCMYToggle,kMaxColor,1));

This assigns a button to three sliders so that you can scrub across an image and retrieve color information. New for 2.2, you can select the current color, the average color, the minimum color, or the maximum color values. You can also assign a toggle switch to select the input node's color or the current node's color. For example, if you are pulling keys, you probably want to use the input node color since you are scrubbing (usually) blue pixels, rather than the keyed out pixels. You can also choose to return different color spaces other than RGB. Assigning a color picker creates a subtree of those parameters.

There are three parameters for the nuiConnectColorPCtrl function:

The first one is the color space, which can be declared with either a string (for clarity) or an integer:

kRGBToggle  0
kHSVToggle  1
kHLSToggle  2 
kCMYToggle  3

The second parameter describes the type of value to be scrubbed, either the current, average, minimum or maximum. Again, you can use either the word of the integer.

kCurrentColor  0 
kAverageColor  1
kMinColor   2 
kMaxColor  3

The last parameter is a toggle to declare if you are using the current node's pixel values or the input node's. You use either 0 or 1:

0 = current node
1 = input node

Using the current node can possibly cause a feedback loop.

Therefore, the above example creates a subtree called Color for the function called MyFunction. The scrubber (defying the logic of calling your parameters red, green, blue) is actually returning CMY values, of which it only returns the maximum value. When the Color Picker is called, the Use Source Buffer is turned on.

 

Creating A Pop-Up Menu for a Parameter
nuxDefMultiChoice("KeyMix.controlChannel", "A|R|G|B");

This pop-up menu, from the IBlur function, allows you to use a pop-up menu for strings. Note this only supplies strings and not numbers.

 

Adding A Function into a Right-Mouse menu
nuiPushMenu("NRiNodeViewPopup",1);
    nuiPushMenu("This Creates a Sub-Menu",0);
        nuiMenuItem("Grad",    nuiToolBoxMenuCall({{Grad()}}));
    nuiPopMenu();

This is one example that creates a sub-tab called "This Creates a Sub-Menu", and attaches the Grad function to its list. This is just one example. Take a look at the nrui.h file, since all right-mouse menus are built there. The first line declares under what menu it is built, so typically these commands are added into the nrui.h file.

 

Creating Radio Buttons for a parameter
nuxDefRadioBtnCtrl(
   "Text.xAlign",
   1, 1, 0, 
   "1|ux/radio/radio_left", 
   "2|ux/radio/radio_center", 
   "3|ux/radio/radio_right"
);
nuxDefRadioBtnCtrl(
   "Text.yAlign",
   1, 1, 0, 
   "1|ux/radio/radio_top", 
   "2|ux/radio/radio_center", 
   "3|ux/radio/radio_bottom"
);

This example is for the Text node. This code creates a series of radio buttons that are mutually exclusive. The naming convention assumes that you have four icons for each name, with the icon names name.on.nri, name.on.focus.nri, name.off.nri, and name.off.focus.nri. If no icons exist, you can choose to not use icons, which will then give a label with an on/off radio button instead. The code has these parameters:

nuxDefRadioBtnCtrl(
   const char *name, 
   int useIcon, 
   int useLabel, 
   int animatable,            
   curve string state0, ....
); 

You can place as many icons as you want. The height of Nothing Real's standard icon is 19 pixels, although this can change. The output parmater for Primatte and Keylight is a good example. Just for the record, for those of you who have seen Apple's OSX, we'd just like to add that the yummy buttons are modeled off of Shake's Manual Update button, rather than off of Apple's equally swell buttons.

Creating a Push-Button Toggle for a Parameter
nuxDefExprToggle("DeInterlace.mode", 
  "ux/replicate.nri|ux/replicate.focus.nri", 
  "ux/interpolate.nri|ux/interpolate.focus.nri",
  "ux/blur.nri|ux/blur.focus.nri"
);

This assigns a series of buttons to toggle through integers starting at 0. The first line gets assigned a value of 0, the second line gets 1, the third gets 2, etc. 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 cursor passes over the button to signify that you can press it. Note the standard buttons are all in the sub-directory ux, but they don't have to be. Shake comes with a series of pre-created icons which are packed into the icons.pak file, and are inaccessible to the user, but is understood by this code. Your custom icons can be any size, but the default height is 19 pixels. You can't have an alpha channel attached to them. Use SetAlpha 0 or Reorder rgbn to remove the alpha channel. They can be placed in <ShakeDirectory>/icons , the <UserDirectory>/icons, or $NR_ICON_PATH.

 

Creating an Off/On Toggle for a Parameter
nuxDefExprToggle("DilateErode.soften");

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

 

Opening a Browser from a Parameter
nuxDefBrowseCtrl("FileIn.imageName",	kImageIn);
nuxDefBrowseCtrl("FileOut.imageName",	kImageOut);
nuxDefBrowseCtrl("fileName",		kAnyIn);
nuxDefBrowseCtrl("lookupFile",		kExprIn);
nuxDefBrowseCtrl("scriptName",		kScriptIn);
nuxDefBrowseCtrl("renderPath",          kAnyOut);

This assigns a folder button to a string so that you can re-launch the File Browser. The Browser remembers the last directories you were in for any different type, so you can assign the type of file the Browser should be looking for as well with kImageIn/Out, etc. For example, if you have a macro which browses an image to be read in, you would use kImageIn, so when you hit that button, it will jump to the last directory you read an image from.

  • kImageIn: Directory of the last image input directory
  • kImageOut: Directory of the last image ouput directory
  • kAnyIn: Directory of the last input directory of any type.
  • kAnyOut: Directory of the last output directory of any type.
  • kScriptIn: Directory of the last script input directory.
  • kScriptOut: Directory of the last script output directory.
  • kExprIn: Directory of the last expression input directory.
  • kExprOut: Directory of the last expression output directory.

 

 

Adding A Curve Editor for Parameters
nuiPushControlGroup("colorExpr");
nuiGroupControl("Lookup.rExpr");
nuiGroupControl("Lookup.gExpr");
nuiGroupControl("Lookup.bExpr");
nuiGroupControl("Lookup.aExpr");
nuiPopControlGroup();
registerCurveFunc("colorExpr"); //This makes all curves invisible by default
registerCurveFuncVisible("colorExpr"); //This makes all curves visible by default gui.colorCtrl.curveEditorDirection = 0; //When this equals 0, the layout is horizontal //When it is 1, the layout it vertical
This code will load a curve editor embedded inside the Parameter tab. The frst 6 lines of code simply group parameters together. The last line then attaches them to the Curve Editor embedded in the Parameter tab.

Automatic Browser Launching on Creation of an I/O Macro.  
nuiToolBoxItem("ProxyFileIn",   
  {{ 
  const char *filename = getFileInName();
  filename ? ProxyFileIn(filename,0,2) :
  (image) 0 
  }} 
);

In this example, we are calling the browser for the parameter filename in the ProxyFileIn macro. The macro has three parameters, filename, and two numbers (0 and 2). The getFileInName function will automatically launch the browser when the user creates this node in the interface. You can use

  • getFileInName()
  • getFileOutName()
  • getScriptInName()
  • getScriptOutName()
Setting Browser Default Directories  
gui.fileBrowser.lastImageDir= "C:/pix/" ;
gui.fileBrowser.lastScriptDir= "$MYPROJ/shakeScripts/" ;
gui.fileBrowser.lastExprDir= "//Server/shakeExpressions/" ;
gui.fileBrowser.lastTrackerDir= "$MYPROJ/tracks/" ;
gui.fileBrowser.lastAnyDir= "C:/Jojo/" ;

You can assign specific directories the Browser will look in when you start the GUI. You can assign different directories to different types of files, i.e., scripts, images, trackers, and expressions. Important: There must be a slash at the end of the path.

 

Browser Default Filters  
gui.fileBrowser.lastImageRegexp= "*.tif" ;
gui.fileBrowser.lastScriptRegexp= "*.shk" ;
gui.fileBrowser.lastExprRegexp= "*.txt" ;
gui.fileBrowser.lastTrackerRegexp= "*.txt";
gui.fileBrowser.lastAnyRegexp= "*";


You can assign specific filters for the browser for different types of Browser activity. For example, if you only use Cineon files, you might want to use an assignment like:

gui.fileBrowser.lastImageRegexp= "*.cin" ;

 

Browser Favorite Directories  
nuiFileBrowserAddFavorite("D:/icons/scr/"); 
nuiFileBrowserAddFavorite("D:/icons/pix/"); 


All directories you assign here will appear in your Favorites area of the Directories pop-up menu in the Browser so you can quickly jump to them.

 

Maximum Viewer Resolution  
gui.viewer.maxWidth = 4096;
gui.viewer.maxHeight = 4096;

By default, Shake protects the user from test rendering an enormous image by limiting the resolution of the Viewer to 4k. If the user accidently puts a Zoom of 200 on the comp, it won't try to render some astronomically enormous file, but instead will only render the lower-left corner of the image cropped at 4k. To change this behavior, set a higher or lower pixel resolution. These assignments have no effect on files written to disk.

 

 

Setting Default Width and Height and Aspect Ratio  
script.defaultWidth = 720;
script.defaultHeight = 486;
script.defaultAspectRatio = 1;

Whenever you create an image in Shake, i.e., a RGrad, Grad, Ramp, etc, it will take the defaultWidth and defaultHeight as its width and height. The aspectRatio parameter (found in Move2D, Twirl, RGrad, etc) will also take the defaultAspectRatio as well. This differs from the startup Directory declaration as it will only affect you when you are in the GUI.

Default Number of Undo Levels  
gui.numUndoLevels= 100;

How many undo levels you want.

 

Assigning Viewer Scripts
image ViewerScript1_(
  image img, 
  int chartOverlay = 0, 
  int videoSafe = 1, 
  int matteOverlay = 0
)
{
    return Overlays(img,chartOverlay,videoSafe,matteOverlay);
}


image ViewerScript3_(
  image img, 
  int left=0, 
  int right=width, 
  int bottom=0, 
  int top=height
)
{
    return SetDOD(img,left,right,bottom,top);
}

Shake comes with 3 default Viewer scripts that can be assigned to a Viewer to modify the image, but do not affect the output image. By default, you have a Safe Frame overlay, a DelogC, and a SetDOD function. You can change this simply by creating a macro (which, I know, usually goes in the startup Directory) and calling it ViewerScript1_, ViewerScript2_, or ViewerScript3_.

 

Dual-Head Monitors for NT  
gui.dualHead= 1;
// This is an example of what you can do to open a second
// viewer desktop on the other monitor.
if(gui.dualHead) spawnViewerDesktop(1290,10,1260,960);

If this value is 1, then Shake assumes you are using a dual-monitor setup. Pop-up messages will appear in the center of one of the monitors, not in between the two. The last line shows a sneaky feat that will automatically open up a Viewer in the second monitor. See below for more information on dual-monitor setup.

 

Setting Default Processors used for a Multi-Processor Machine  
sys.maxThread = nrcGetAvailableProcessors();

This sets the default number of processors you assign to Shake when running it interactively. You can either use a number, or use the default command which automatically assigns all available processors to Shake. In the command-line mode, use the -cpus option, i.e.,

shake -exec my_script.shk -cpus 4

 

UI Window settings  

In the <UserDirectory>/settings/ui.h file is a list of about 50 settings that get saved and read by Shake. They control default Pixel Analyzer values, window layout, and Viewer button settings. These values also get saved into the bottom of a Shake script. You have to explicitly save your settings as <UserDirectory>/settings/defaultui.h for Shake to read them by default, if you save them elsewhere you can read them with File: Load interface settings.

 

Coloring of Time Bar  
gui.color.timeSlider = 0x4B4B4BFF;
gui.color.timeSliderFocus = 0x5B5B5BFF;
gui.color.timeSliderText = 0x0A0A0AFF;
gui.color.timeSliderTextFocus = 0x000000FF;
Just a few plugs to change the coloring of the text in all time-based windows like Curve Editor, Time Bar, etc.

 

Setting Tab Colors
nuiPushToolBox("Image");
nuiSetObjectColor("ImageToolBox", 
tabRed, tabGreen, tabBlue,
textRed, textGreen, textBlue); nuiPopToolBox();

This is an excerpt from the nrui file. The Image tab has been opened, and the assigned a color for both the tab and the text on the tab. Instead of numbers for the color values, I have used variables here to indicate what the parameter is.

Doing this will not automatically assign color to nodes within the tab.

 

Setting Node Colors
nuiSetMultipleObjectsColor(
    nodeRed, nodeGreen, nodeBlue,
    textRed, textGreen, textBlue,

    "DisplaceX",	
    "IDisplace",	
    "PinCushion",	
    "Randomize",	
    "Turbulate",	
    "Twirl",		
    "WarpX"
);
This command assigns colors to node in the Node View. The nodeRed, green, etc and textRed, green, etc are supposed to be float values. When coloring the nodes, keep in mind the default artwork is a medium grey, so you can have numbers above 1 for the node color parameters to multiply it up.

 

Setting Favorite Tremor Functions  
nuiPushToolBox("Transform");
nuiAddToolboxFav("Move3D");
nuiPopToolBox();

This will load a function into the Tremor-style interface's center bar. You designate the Function type and then the node.

 

 template Preference Files

 

You can add additional parameters and default settings by adding files into the startup/ui/templates directory. Everytime Shake is launched, it will add these extra parameters. For example, if you always want the Proxy Filter to be "box" instead of "default", and you always want a slider in the Globals tab called switch1, create a .h file under the templates directory with:

SetProxyFilter("box");
curve int switch1=0;

Basically, take a saved script and strip out the lines you want to set as defaults, and save it as a .h file into templates. For a good example of using a template file to use pregenerated proxies, jump to the Cookbook's proxyToggle page.

   Environment Variables for Shake

 

Cineon frames are written in the slower top-down method for compatibility with other less protocol-observant software.

 

 

   Interface Devices and Styles

 

Using a Stylus

Left-handed users

If you are left-handed, set the mouse behavior within the OS itself. On the SGI, its is under the Desktop-Customize-Mouse page tab, and on NT, its under Start-Settings-Control Panel-Mouse.

Dual-head monitors

With the menu command View: Spawn Viewer Desktop, you can create a new Viewer window that floats above the normal Shake interface. You can therefore move it to a second monitor, clearing up space on the first for node editing operations. This only works when both monitors are being driven by the card. Systems with two X servers running two graphics cards are not yet supported.

This is also a handy ui Directory command to automatically create the second Viewer Desktop:

gui.dualHead= 1;
// This is an example of what you can do to open a second
// viewer desktop on the other monitor.
if(gui.dualHead) spawnViewerDesktop(1290,10,1260,960);

Setting the Monitor resolution for a SGI IRIX machine

The Tremor-style interface, regardless if it is Shake or Tremor, is designed for a 1600-pixel wide interface. To set your resolution on an SGI, you can use either xsetmon, which is a graphical interface for setting it, or use the command-line setmon. This is SGI's thing, by the way...

To set your resolution, use the command 'setmon' in the command line,
AS ROOT:

/usr/gfx/setmon -x 1600x1024_72

The allowed values depend on your graphics card. If you are using an Octane with MXI graphics, go to the
/usr/gfx/ucode/MGRAS/vof/2RSS/ directory to see the allowed choices. In the case of the MXI Octance, you have:
1024x768_60.sdb 1280x1024_72.sdb

1024x768_60p.sdb              1280x1024_76.sdb 
1024x768_72.sdb               1280x492_120s.sdb 
1024x768_76.sdb               1280x960_30i.sdb 
1024x768_96s.sdb              1600x1024_72.sdb 
1024x768_96s_vs.sdb           1600x1200_60.sdb 
1280x1024_49.sdb              1600x1200_60_32db.sdb 
1280x1024_50.sdb              1920x1035_60.sdb 
1280x1024_50_2f.sdb           1920x1080_60_32db_gdm24w.sdb 
1280x1024_59.sdb              616x492_140os.sdb 
1280x1024_60.sdb              640x480_60.sdb 
1280x1024_60_2f.sdb           640x486_30i.sdb 
1280x1024_60p.sdb             768x576_25i.sdb 

So: /usr/gfx/setmon -x [settingFileWithoutExtension]

In both cases, you will have to log out and log in again. No reboot needed.