Cutter, version 5.3.5 and later, is designed to ease the task of writing, compiling and linking a 'C' language file that implements a RenderMan shadeop. Cutter's most important feature is that on Linux and MacOSX a shadeop 'C' language file can be directly compiled and linked without the need for the user to write a Makefile - figure 1.
Cutter applies syntax coloration to a 'C' language file that it recognizes to be the source code of a shadeop. Recognition is based on finding one of following macros in the 'C' file, SHADEOP_TABLE, SHADEOP_INIT or SHADEOP_CLEANUP. Cutter also provides a quick way to access the Pixar web document that explains how shadeops are written. The document is located at,
The browser will scroll to the first instance of the selected word. The next instance
can be found by hitting the return key.
Lastly, Cutter enables a user to conveniently open an "#included" header file by control + clicking in the name of the header file - figure 3. Cutter automatically "expands" the selection to boundaries of the file name; the user does not have to manually select the name of the header file.
Compilation, Linking & Makefiles
Upon receiving the keyboard shortcut
CUTTER_DIRECTORY/custom_templates/Makefile or CUTTER_DIRECTOY/Cutter_Help/templates/Makerfile
In the case of Linux, Cutter looks for a file named
Listing 1 (Makefile.dsoLINUX)
Within a template Makefile the following strings act as "placeholders",
DEVKIT_INCLUDE_PATH OTHER_INCLUDE_PATHS YOUR_DSO_NAME OTHER_OBJ_PATHS
Cutter copies the text of the template Makefile and substitutes the placeholders with the appropriate information derived from the name of the 'C' file the user is editing and from information found in preferences. Therefore, it is essential the user has correctly setup their prefs.
Setting Up the ShadeOP Preferences
The preferences for "ShadeOP" is shown in figure 4. The first path should specify
the location of the
The "User Paths", shown empty in figure 4, should specify the full path to the
If compilation and linking are successful, a DSO will be created in the same directory as the 'C' source code. If the user has set their "User Paths & Options" (figure 6), additional copies of the DSO will be saved in the users "shaders" and "RSL source" directories.
© 2002- Malcolm Kesson. All rights reserved.