ShadeTree then checks for and loads the following files in order:
.\stree.def | Loads from the current directory |
$HOMEDRIVE\$HOMEPATH\stree.def | Loads from your home directory |
These files are optional, and should contain a limited subset of the commands found in the master defaults file, effectively overriding or augmenting the master settings. These commands are described below.
The $STREE_DIR\login\mray directory is a sample test directory and contains an example user stree.def file showing typical stree.def settings a user might want to put in their home directory. All the commands are commented out; you're expected to copy this file, and uncomment commands you would want to change.
Please refer to the stree.def technical documentation for an in depth description of the stree.def file syntax.
Each 'box' in the ShadeTree program has an ASCII operation box description file associated with it, containing commands that describe the size and color of the box, the buttons, the icons, the kind of sliders for each button, and what code is generated when the box is on the desk.
Refer to the opbox technical reference documentation for an indepth description of this file.
ShadeTree's own ascii opbox definition files can be found in the directory tree:
This directory tree reflects the 'Operation Menu Bar' in the interface; subdirectories are found as 'sub menus' in ShadeTree. Any files show up as selectable items in these menus; one file per opbox. When a menu item is selected, the opbox file is loaded, creating a box that you can then drop desk.
When ShadeTree is invoked by a user, the menu directory is recursively descended to create the Operation Menu Bar.
If the user has their own menu directories, ShadeTree can be instructed to descend those directories too, by specifying the following command in the user's .\stree.def or $HOMEDRIVE\$HOMEPATH\stree.def file:
NOTE: The last directory component MUST be called 'menu', for correct sorting into the menus.
Making your own opboxes involves making your own menu directory hierarchy in those dirs, similar in spirit to the structure of the $STREE_DIR\mray\menu directory hierarchy, then putting your own boxes in it. Please read the above documentation for a step-by-step tutorial.
Use ShadeTree's own opbox files for reference! The best way to understand how to make new opboxes, is to refer to the existing ones. Simply choose existing boxes that are most like what you want to do, and look at how they're implemented.
ShadeTree makes it easy for you to look at the code for existing opboxes. Just put your mouse over the center of an opbox that is sitting on the desk (not over one of the box's buttons) and press the right mouse button to bring up a menu, and click on Edit File:
A window will come up with the default text editor viewing the opbox file that describes that box. To configure your own text editor to edit this file, see this shadetree documentation that describes the EDITOR environment variable.
You can either manually set it in the Render Options Editor, or you can have it come up as a default by setting it in either of the following ShadeTree definitions files:
$HOMEDRIVE\$HOMEPATH\.stree.def | your home directory setup file |
.\stree.def | current directory setup file |
... just add the command:
If you don't have this, the default will be ShadeTree's own custom render script, which will render a teapot. This script is in:
... not to mention an absolutely bare-bone, very simple self contained custom render script:
Note hitting the F1 key, or 'Render' in either the main menu or the Render Options Editor will now invoke the custom render script instead. This will stay in effect until you disable the option.
These frame ranges are passed to all render scripts as environment variables:
Using this script as a guide, any healthy perl programmer should be able to figure out what's going on. Most of the work is done in the scripts, for flexibility.
Keep in mind that if the user hits 'Stop', this sends a SIGTERM to the render process hierarchy. The top level 'renderit' script traps these signals in order to clean out (remove) the temp directory.
Copyright (c) 1996-1998 Cinema Graphics Inc. All Rights reserved.