Auto Opening an SL Source Code File
It has been possible with recent versions of Cutter to display the RSL source
code for a shader selected from the RmanTools->Shaders menu.
For example, choosing a "system" shader such as aachrome while holding
down the option key or, on OSX, the apple key would cause
Cutter to display the souce code file corresponding to "aachrome.slo".
With version 4.1.0 this functionality has been added to the custom shaders
compiled by the user. Compiled user shaders, located in
Preferences->RMan->User>Shaders
are listed at the "end" of the system shaders. For example, suppose a user compiled
displacement shader named "messageout" appears after the standard Pixar
displacment shaders - see opposite. By choosing the "messageout" shader,
with either the option or, on OSX, the apple key pressed, Cutter will attempt to find an RSL
source code file whose name matches the name of the shader. Cutter conducts
its search by looking recursively (maximum depth 8) at the directory
nominated by the user preference.
Preferences->RMan->User>RSL source
If the file is found it will be opened on Cutter's desktop. However, if a
direct match is not obtained Cutter will recursively search all the .sl files
in the "RSL source" directory looking for a shader or function declaration
that matches the name of the shader.
"System" shading language source code files will be marked as unsaveable and uneditable.
Of course a copy can be made using "Save As...". Shading language source code
files found in the users "RSL source" directory can be edited directly within Cutter.
If Cutter is unable to find a
matching source code SL file it will parse ALL the shaders in the "shaders"
directory and display a warning dialog box that lists all the source code
files, irrespective of their names, that either implement the "target" compiled
shader or implement a function of the same name. Its up to the user to try to
figure out which of these SL files was the actual source code for the
compiled shader!
|