ShadeTree Definitions Reference (stree.def)

There are several ways to view into the reference guide:

What follows is the the command reference. If you find errors in the docs, please contact us via email to [email protected]


REFERENCE GUIDE

SHADETREE-DEFS(1)          Cinema Graphics, Inc.        SHADETREE-DEFS(1)

NAME
    shadetree-defs - Definition file command description

DESCRIPTION
    When ShadeTree boots, it first loads default settings from the master
    defaults file %STREE_DIR%\mray\stree.def'. This file should 
    not be edited by anyone.
    
    ShadeTree then checks for and loads the following files:

                %HOMEDRIVE%\%HOMEPATH\.stree.def   # in your home directory
                .\stree.def                        # in the current directory

    These files may contain any commands that can be found in the master
    defaults file, and can therefore effectively override the master default
    settings, or append to them. These commands are described below.

    Note: In all cases where pathnames are specified, pathnames starting 
    with '.' are assumed relative to the working directory.  Pathnames
    that are otherwise relative (i.e. which don't start with '\', such as
    images\wallpaper.sgi) are relative to $STREE_LIB (e.g. C:\shadetree\mray).

HEADING DESCRIPTIONS
--------------------
    NAME        - Shows the name of the command, and an overall syntax.  

    EXAMPLE     - An actual example of the command.

    CONTEXT     - Lists the commands that this command is supposed to appear 
                  within. For instance, the 'label' command creates a label 
                  widget. This command is only relevant within the context 
                  of the 'roe' command, so the CONTEXT for 'label' shows 'roe'.

    DESCRIPTION - A description of the command, and its usage.

    CAVEATS     - Exceptional notes of interest.


TABLE OF CONTENTS

  • 1.0.0 Render Options Editor (ROE)
  • 2.0.0 Tool Bar
  • 3.0.0 Desk Options (desk)
  • 5.0.0 Operation Boxes Global Settings (box.*)
  • 6.0.0 Word Translations (wordtranslate.*)
  • 7.0.0 Miscellaneous Settings
  • 8.0.0 Code Generator (codegen.*)
  • 9.0.0 Data Type Constructs (datatype)



    1.0.0 Render Options Editor (ROE) The Render Options Editor is pretty flexible as of version 0.10.4; you can completely define the interface using ASCII commands in the 'roe' section of the stree.def file. These commands define the input fields, their position in the Render Options Editor window, their default values, and the environment variables and/or action messages sent to the main program.


    1.1.0 Miscellaneous Commands


    1.1.1 roe - The ROE Construct NAME roe { roe init cmds roe context cmds } CONTEXT none DESCRIPTION Starts the definition construct for the Render Options Editor (ROE). Only roe related commands can appear within the construct. This construct defines all the data input fields in the ROE. EXAMPLE roe { # CLEAR ANY PREVIOUS WIDGETS FROM THE ROE clearall # MAIN WINDOW DIMENSIONS winwidth 381 winheight 627 # DEFINE A LABEL WIDGET label { label RENDER OPTIONS } # AN X/Y FIELD WIDGET xyfield { optionlabel Resolution value 256,256 separatorlabel X envname STREE_RES envseparator "," forcefloat optioncontents { 256,256 512,512 800,800 } } # OTHER WIDGETS CAN BE DEFINED HERE }


    1.1.2 winwidth - Width of dialog window NAME winwidth <pixels> EXAMPLE winwidth 320 CONTEXT roe DESCRIPTION Defines the width (in pixels) of the Render Options Editor window. It helps to use the Spy utility, included in the Microsoft Visual C++ program group, to determine the dimensions for the window after manually resizing it, and then plug those values into 'winwidth' and 'winheight'.


    1.1.3 winheight - Height of dialog window NAME winheight <pixels> EXAMPLE winheight 560 CONTEXT roe DESCRIPTION Defines the height (in pixels) of the Render Options Editor window. It helps to use the Spy utility, included in the Microsoft Visual C++ program group, to determine the dimensions for the window after manually resizing it, and then plug those values into 'winwidth' and 'winheight'.


    1.1.4 clearall - Clear all widget definitions NAME clearall CONTEXT roe DESCRIPTION Clear all input field definitions for the Render Options Editor. Usually, do this at the top of the roe definition to clear out any previous definitions. If you don't do this, any definitions will be appended to any previously defined input fields. Use 'clearall' in the stree.def in your home directory or the working directory in which you run your program if you want to totally redefine the Render Options Editor, rather than to append to the existing one.


    1.2.0 Field Inputs - Defining widgets


    1.2.1 label - The Label Widget Construct NAME label { label context cmds } CONTEXT roe frame DESCRIPTION The 'label' construct defines a Label widget in the current context. Examples of a label construct: # LABEL CONSTRUCT # All possible contents # label { # REQUIRED: 'label' sets the text message # label RENDER OPTIONS # OPTIONAL: 'justify' sets justification of text within the # containing Frame. Can be any of: # # left, center, right # justify center # OPTIONAL: 'resize 0' disables auto-sizing of the # frame around the text. Default is enabled (1). resize 0 # OPTIONAL: Set 'width' if you want to specify a fixed value # (in pixels). You must use 'resize 0' first for # this command to work. # width 50 # OPTIONAL: Set 'height' if you want to specify a fixed value # (in pixels). You must use 'resize 0' first for this # command to work. # height 30 }


    1.2.2 xfield - The single value field (shading rate, zoom) NAME xfield { xfield context cmds } CONTEXT roe DESCRIPTION Defines a single field of information, complete with a chooser, text window, and help button. Values entered will be assigned as an environment variable, whose name is defined by 'envname'. Subcommands can be any of: envname <varname> - Defines the name of the environment variable the value entered will be assigned to. forcefloat - Optional. Indicates the values saved should be forced to have a decimal point. If user enters '4', the saved value will be '4.0'. nostreesave - When saving a foo.str file, DON'T save this value's settings into it. optionlabel <text> - The label on the chooser will be set to this text string. value <text> - The initial value of this string optioncontents - The contents of the option (chooser) button { goes here, one option per line. text text } help - Defines the help text that comes up when { you click on the help button. Leading white text space is ignored. If you want to indent, } use '>'. EXAMPLE # SHADING RATE FIELD xfield { # MANDATORY: 'envname' defines the name of the environment # variable that is passed to the render script with # the value the user enters. # envname STREE_SHADERATE # MANDATORY: 'optionlabel' specifies the text that appears in the # option button. # optionlabel Shading Rate # MANDATORY: Specifies the default value for the field value 2.0 forcefloat # OPTIONAL: Specifies the contents for the popup option menu # button. When the user selects these, the value is # copied into the text window. Only the first token # in the option value is used in the environment # variable setting (in the example below, the word # parenthesized comments appear only in the menu). # optioncontents { 8.0 (fast) 4.0 2.0 1.0 (norm) 0.75 0.50 0.25 (slow) } # OPTIONAL: Specifies the help text that appears when the user # clicks on the 'i' information help button. Leading # white space is stripped. help { Shading Rate; sets the frequency of shading a surface. Basically, higher numbers render faster. The value is an area in pixels: > 2.0 - surface is shaded once per two pixels > 1.0 - surface is shaded about once per pixel > 0.5 - surface is shaded about twice per pixel } }


    1.2.3 xyfield - The two value field (resolution) NAME xyfield { xyfield context cmds } CONTEXT roe frame DESCRIPTION Defines a double field of information, complete with a chooser, two text windows (one for each value), and help button. Values entered will be assigned as a single environment variable, whose name is defined by 'envname'. The two values are separated by the character defined in 'envseparator'. Subcommands can be any of: envseparator <text> - Optional. Defines the character that separates the two values within the single environment variable. Default is a ",". The character must be quoted. " " is allowed. envname <varname> - Defines the name of the environment variable the value entered will be assigned to. forcefloat - Optional. Indicates the values saved should be forced to have a decimal point. If user enters '4', the saved value will be '4.0'. nostreesave - When saving a foo.stree file, DON'T save this value's settings into it. optionlabel <text> - The label on the chooser will be set to this text string. separatorlabel <text> - Optional. Defines character to be displayed between the two value text windows. value <text> - The initial value of this string. Text should be quoted. optioncontents - The contents of the option (chooser) button { goes here, one option per line. text text } help - Defines the help text that comes up when { you click on the help button. Leading white text space is ignored. If you want to indent, } use '>'.


    1.2.4 xyzfield - The three value field (object rots, Frame ranges) NAME xyzfield { xyzfield context cmds } CONTEXT roe frame DESCRIPTION Defines a triple field of information, complete with a per-value chooser, three text windows (one for each value), and a help button. Values entered will be assigned as INDIVIDUAL environment variables, whose name is defined by '[xyz]envname'. headinglabel <text> - General heading title for the frame that contains the 3 values. xenvname <text> - Defines the name of the environment variable yenvname <text> the associated value is assigned to. zenvname <text> xoptionlabel <text> - Defines the text that appears in each button. yoptionlabel <text> zoptionlabel <text> xvalue <text> - Defines the default value that appears in yvalue <text> each text window, above each button. zvalue <text> forcefloat - Optional. Indicates the values saved should be forced to have a decimal point. If user enters '4', the saved value will be '4.0'. nostreesave - When saving a foo.str file, DON'T save this value's settings into it. xoptioncontents - The contents of the option (chooser) buttons, { one option per line. text text } yoptioncontents { same as above } zoptioncontents { same as above } help - Defines the help text that comes up when { you click on the help button. Leading white text space is ignored. If you want to indent, } use '>'. EXAMPLE xyzfield { headinglabel Object Rotation xenvname STREE_OBJ_ROTX yenvname STREE_OBJ_ROTY zenvname STREE_OBJ_ROTZ xoptionlabel X yoptionlabel Y zoptionlabel Z xvalue 0.0 yvalue 0.0 zvalue 0.0 forcefloat xoptioncontents { "-180.0 (Upside Down)" "-90.0" " 0.0 (Front View)" " 90.0" "180.0 (Upside Down)" } yoptioncontents { "-180.0 (Back View)" "-90.0" " 0.0 (Front View)" " 90.0" "180.0 (Back View)" } zoptioncontents { "-180.0 (Upside Down)" "-90.0" " 0.0 (Front View)" " 90.0" "180.0 (Upside Down)" } help { Rotates the object around XYZ axes. } }


    1.2.5 button - Single push button NAME button { button context cmds } CONTEXT roe frame DESCRIPTION To be done. EXAMPLES button { buttonlabel Render It actionto form actionmsg render actionarg render }


    1.2.6 ledbutton - State button NAME ledbutton { ledbutton context cmds } CONTEXT roe frame DESCRIPTION To be done. nostreesave - When saving a foo.str file, DON'T save this value's settings into it. EXAMPLES ledbutton { buttonlabel Custom Render actionto streemainwindow actionmsg custom-render-toggle-roe-noupdate envname STREE_CUSTOMREN_FLAG envon "on" envoff "off" state 0 }


    1.2.7 chooser - Single one-of-n chooser NAME chooser { chooser context cmds } CONTEXT roe frame DESCRIPTION To be done. nostreesave - When saving a foo.str file, DON'T save this value's settings into it. EXAMPLES chooser { resize false envname STREE_OBJECT value sphere choosercontents { sphere patch cylinder corner } }


    1.2.8 okfield - The OK and DEFAULTS buttons NAME okfield { okfield context cmds } CONTEXT roe frame DESCRIPTION To be done. EXAMPLES okfield { defaults_actionto roe defaults_actionmsg use-defaults defaults_actionarg noarg ok_actionto form ok_actionmsg roe ok_actionarg hide }


    1.2.9 stringinput - Input strings and filenames input NAME stringinput { stringinput context cmds } CONTEXT roe frame DESCRIPTION To be done. nostreesave - When saving a foo.str file, DON'T save this value's settings into it. EXAMPLES stringinput { label Custom Render Script value bin/custom-render file 1 envname STREE_CUSTOMREN help { Sets the pathname to the custom render script. When 'Custom' button is highlighted, this is the script that is executed whenever you hit 'Render'. } }


    1.2.10 frame - A container for any of the above widgets NAME frame { { frame control commands } frame context cmds } CONTEXT roe frame DESCRIPTION To be done. EXAMPLES frame { { # THESE COMMANDS CONTROL THE FRAME vertical 2 } label { resize false width 20 height 10 label Shader justify right } chooser { resize false envname STREE_SHADER_TYPE value surface choosercontents { surface displace light volume } } }


    2.0.0 Tool Bar


    2.1.1 toolbutton - defining the tool bar defaults NAME toolbutton <num>=<boxname> CONTEXT none These commands pre-program the toolbar buttons (currently 0-7) to access any of the items in the Operation Menu Bar. toolbutton 0=add toolbutton 1=subtract toolbutton 2=multiply toolbutton 3=divide toolbutton 4=negate toolbutton 5=mixed toolbutton 6=UserDefined toolbutton 7=rgb2color


    3.0.0 Desk Options (desk)


    3.1.1 desk.setbgimage - background image for the desk NAME desk.setbgimage <pathname> CONTEXT none DESCRIPTION This command should point to an .rgb or .sgi image that is to be dropped into the desk's background. This isn't used much, unless you want to drop a picture of you wife and kids into the ShadeTree interface.


    3.2.1 desk.backgroundcolor - background color NAME desk.backgroundcolor <r> <g> <b> CONTEXT none DESCRIPTION Sets the background color for the desk. Values are 0.0 to 1.0.


    3.3.1 desk.rubberbandcolor - rubberband box color NAME desk.rubberbandcolor <r> <g> <b> CONTEXT none DESCRIPTION Sets the color of the 'rubber band' line used to lasso boxes. Values are 0.0 to 1.0.


    3.4.1 desk.connectcolor - color of connect lines NAME desk.connectcolor <r> <g> <b> CONTEXT none DESCRIPTION Sets the color of the inter-connection lines between boxes. Values are 0.0 to 1.0.


    3.5.1 desk.selectedconnectcolor - color of connect lines when selected NAME desk.selectedconnectcolor <r> <g> <b> CONTEXT none DESCRIPTION Sets the color of inter-box connection lines when they are selected (clicked on with the left mouse). Values are 0.0 to 1.0.


    3.6.1 desk.showvarnames - show var. names above connect lines NAME desk.showvarnames <0|1> CONTEXT none DESCRIPTION Enables (1) or disables (0) the display of variable names next to the box connection lines. When enabled, these show the variable name associated with the connection line. Since the lines represent data flow, it sometimes helps in debugging to know which line is which.


    3.7.1 desk.zoomminmax - max/min desk zooming values NAME desk.zoomminmax <min> <max> CONTEXT none DESCRIPTION Sets bounds for the desk zoom (ALT-MIDDLE dragging), to prevent erratic behavior caused by excessive zooming.


    3.8.1 desk.linetype - style for drawing connect lines NAME desk.linetype <trace|direct> CONTEXT none DESCRIPTION Sets the mode for drawing connection lines. Normally, this is always 'trace'. Most people find it preferable to 'direct'.


    3.9.1 desk.lock - lock the desk NAME desk.lock <0|1> CONTEXT none DESCRIPTION Locks (1) or unlocks (0) the desk. When the desk is locked, you cannot add or remove boxes, you can only tweak sliders.


    3.10.1 desk.showiconimages - enable/disable icons in boxes NAME desk.showiconimages <0|1> CONTEXT none DESCRIPTION Enables (1) or disables (0) the display of icons in the boxes. When using cheap hardware, you may find disabling icons can speed up the interface's response.


    3.11.1 desk.statusbar - enable/disable the status bar NAME desk.statusbar <0|1> CONTEXT none DESCRIPTION Enables (1) or disables (0) the display of the status bar.


    3.12.1 desk.boxtint - overall tint color for all boxes NAME desk.boxtint <r> <g> <b> CONTEXT none DESCRIPTION Overall tint for the boxes. These values are basically added to (offset) the RGB colors for all boxes. Negative numbers makes the channel darker, positive numbers make the channel brighter. This allows the administrator to affect the overall 'tint' of all the boxes, to match particular color schemes.


    5.0.0 Operation Boxes Global Settings (box.*)


    5.1.1 box.selectedcolor - color when box selected NAME box.selectedcolor <r> <g> <b> CONTEXT none DESCRIPTION This sets the color of the line drawn around a box when it is selected. Values should be 0.0 to 1.0.


    5.2.1 box.selectedlinewidth - thickness of border around box NAME box.hilightedcolor <r> <g> <b> CONTEXT none DESCRIPTION When a box is highlighted (such as by the Box Finder under the 'Find' menu), it changes to this color. Values should be 0.0 to 1.0.


    5.3.1 box.hilightedcolor - color when box highlighted (menu finder) NAME box.selectedbuttoncolor <r> <g> <b> CONTEXT none DESCRIPTION When a button is selected (with the left button), it changes to this color. Values should be 0.0 to 1.0.


    5.4.1 box.selectedbuttoncolor - color when button selected NAME box.selectedlinewidth <val> CONTEXT none DESCRIPTION <val> represents the width of the line (in pixels) drawn around the box when it is selected. Values should be 0.0 to 1.0.


    5.5.1 box.connectlinewidth - width of connection lines (in pixels) NAME box.connectlinewidth <val> CONTEXT none DESCRIPTION <val> represents the width of the inter-box connection lines. Value is in pixels.


    6.0.0 Word Translations (wordtranslate.*)


    6.1.1 wordtranslate.clear - Clear all previous word translations NAME wordtranslate.clear CONTEXT none DESCRIPTION Clears all word translations previously defined with the wordtranslate.add command.


    6.2.1 wordtranslate.add - add a word translation NAME wordtranslate.add <from> <to> CONTEXT none DESCRIPTION Sets word translations for the menus, to hide the internal ShadeTree language. For instance, 'xyz' is ShadeTree's internal name for a data element that represents the three X/Y/Z values. RenderMan users would prefer to see the word 'point' in the Casts popup menu, whereas Mental Ray users would prefer to see 'miVector'. To serve this need, word translations are setup for 'xyz': wordtranslate.add xyz point # RenderMan wordtranslate.add xyz miVector # Mental Ray ShadeTree translates these words before presenting them to the user in pop up menus (for casting), etc.


    7.0.0 Miscellaneous Settings


    7.1.0 File Browsers


    7.1.1 exportoptions - File->Export Options NAME exportoptions { streedir <flag> [dir] shadersourcedir <flag> [dir] compiledshaderdir <flag> [dir] shaderinterfacedir <flag> [dir] renderinterfacedir <flag> [dir] postsavescript <flag> [file] } [flag] - is either a 0 or 1, controlling the initial state of the toggle buttons in the export options editor, which control whether the corresponding file is saved or not, when the user selects 'File->Export All'. [dir] - sets the default directory for both the 'File->Export Options' browser, and the appropriate browser in the 'File->Export' submenu. Note that a relative path here is taken as relative to the directory in which the .str file resides. For example, if the shadersourcedir value is ".\" the shader source will be exported to the directory containing the .str file on which it is based. CONTEXT none DESCRIPTION Sets the default toggle button states, and directory names for the export options editor, and the individual browsers in the 'File->Export' submenu. These defaults are typically overriden by saved values whenever an existing .str file is loaded from disk. EXAMPLE This example might be for a Mental Ray user, who wants files to export into the appropriate directories in their Softimage chapter file hierarchy: exportoptions { streedir 1 ./ shadersourcedir 1 C:/job/SOFTIMAGE_PROJECT/src compiledshaderdir 1 C:/job/SOFTIMAGE_PROJECT/lib shaderinterfacedir 1 C:/job/SOFTIMAGE_PROJECT/MATERIAL_SHADERS renderinterfacedir 0 postsavescript 1 C:/job/SOFTIMAGE_PROJECT/bin/production_render.bat } SEE ALSO shadetree-operation - Section on 'Export All' shadetree-mray-faq - Section 'Is there a way to easily save out everything..?'


    7.1.2 streebrowser_dir - File->Load/Save NAME streebrowser_dir <pathname> CONTEXT none DESCRIPTION Sets the default directory for the stree file browsers, namely 'Open', and 'Save As'.


    7.1.3 imagebrowser_dir - Options->Load Background Image NAME imagebrowser_dir <pathname> CONTEXT none DESCRIPTION Sets the default directory for the background image file browser, from the Options->Set Wallpaper menu item.


    7.1.4 stringbrowser_dir - String sliders NAME stringbrowser_dir <pathname> CONTEXT none DESCRIPTION Sets the default directory for the string slider's file browser. Each string input button has a 'slider' interface that contains a FILE browser button which, when hit, brings up this file browser.


    7.2.0 Miscellaneous NAME menudir.add <path> CONTEXT none DESCRIPTION This command allows users to define their own menu boxes, and have them appear in the interface. Defines a search path to a menu directory structure where box definition files are expected to be found, similar to the format of the C:/shadetree/mray/menu directory tree. This command is cumulative; several menudir.add commands can be specified to create an entire list of search directories to be included. EXAMPLE menudir.add C:/shadetree/login/shadetree/menus CAVEATS Pathnames that start with '.' work relative to the current directory. Pathnames that don't start with '.', and don't start with '/' are considered to be relative to $STREE_LIB.


    7.2.1 ext.shadersource - filename extension for shader source code NAME ext.shadersource <filename_extension> CONTEXT none DESCRIPTION Defines the filename extension to be used on all shader source code files. The leading '.' should be included. EXAMPLES ext.shadersource .sl # mray ext.shadersource .cpp # mray


    7.2.2 ext.compiledshader - filename extension for compiled shaders NAME ext.compiledshader CONTEXT none DESCRIPTION Defines the filename extension to be used on all compiled shader files. The leading '.' should be included. EXAMPLES ext.compiledshader .dll # mray


    7.2.3 sourcecodeprefilter - path to script that prefilters source code NAME sourcecodeprefilter <path> CONTEXT none DESCRIPTION Points to a script or program that prefilters the source code before compiling it. Often, there are hacks in here to prepare the raw source code from ShadeTree to do various operations, such as: 1) Breaking long lines, if possible 2) Doing some code optimizations 3) Doing some code replacements/tweaks


    7.2.4 maxhistory - Sets the maximum history size for stree files NAME maxhistory CONTEXT maxhistory 20 DESCRIPTION Sets a limit for the number of history files saved.


    8.0.0 Code Generator (codegen.*)


    8.1.0 Misc


    8.1.1 codegen.clearallvariables NAME codegen.clearallvariables CONTEXT none DESCRIPTION Clears all code generator definitions.


    8.1.2 codegen.vararg.sep NAME codegen.vararg.sep CONTEXT none DESCRIPTION Pending.


    8.2.0 Data Types


    8.2.1 codegen.rgb.declare.head - text to head declaration of variables NAME codegen.rgb.declare.head "text" CONTEXT none DESCRIPTION Tells the code generator how to lead off the declaration of RGB variables. For instance, if the desired code generator output is: color varname; \____/\_____/| | | | | | codegen.rgb.declare.tail ";" | | | Internally generated by the macro definitions. | codegen.rgb.declare.head "color "


    8.2.2 codegen.rgb.declare.tail - tail text for declaration of variables NAME codegen.rgb.declare.tail "text" CONTEXT none DESCRIPTION Tells the code generator the text to appear at the tail of RGB variables. See codegen.rgb.declare.head for an example.


    8.2.3 codegen.rgb.declareconst.head - head text for declaring constant variables NAME codegen.rgb.declareconst.head "text" CONTEXT none DESCRIPTION Tells the code generator the text to appear at the head of constant RGB declarations. For instance, if the desired code generator output is: color varname = color(1,2,3); \____/\_____/\_/\__________/| | | | | | | | | | codegen.rgb.declareconst.tail ";" | | | | | | | Internally generated by macro defs | | | | | codegen.rgb.declareconst.equal " = " | | | Internally generated by the macro definitions. | codegen.rgb.declareconst.head "color "


    8.2.4 codegen.rgb.declareconst.equal - equal text for constant variables NAME codegen.rgb.declareconst.equal "text" CONTEXT none DESCRIPTION Tells the code generator the text to appear between the varname and the initial constant value for RGB declarations. See codegen.rgb.declareconst.head for examples.


    8.2.5 codegen.rgb.declareconst.tail - tail declaration for constant variables NAME codegen.rgb.declareconst.tail "text" CONTEXT none DESCRIPTION Tells the code generator the text to appear at the tail of constant RGB declarations. See codegen.rgb.declareconst.head for examples.


    8.2.6 codegen.xyz.* - xyz data during code generation NAME codegen.xyz.* CONTEXT none DESCRIPTION Pending.


    8.2.7 codegen.float.* - float data during code generation NAME codegen.float.* CONTEXT none DESCRIPTION Pending.


    8.2.8 codegen.string.* - string data during code generation NAME codegen.string.* CONTEXT none DESCRIPTION Pending.


    8.3.0 Macro Definitions - Main Program Template


    8.3.1 codegen.global-header - the header area of the program NAME codegen.global-header [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.2 codegen.main-open - the main() declaration NAME codegen.main-open [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.3 codegen.main-args - the main() arguments NAME codegen.main-args [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.4 codegen.main-header - the main() function header area NAME codegen.main-header [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.5 codegen.main-body - the main() function body NAME codegen.main-body [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.6 codegen.main-close - the end of the main() function NAME codegen.main-close [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    8.3.7 codegen.global-close - the end of the program NAME codegen.global-close [append|insert|unique] [macro text] <<EOT>> CONTEXT none DESCRIPTION Pending.


    9.0.0 Data Type Constructs (datatype)


    9.1.1 datatype.clearall - clear all previously defined datatypes NAME datatype.clearall CONTEXT none DESCRIPTION Pending.


    9.1.2 datatype.add - Add a new datatype NAME datatype.add { cmds } CONTEXT none DESCRIPTION Pending. AUTHOR Greg Ercolano, Luigi Warren mailto:[email protected] COPYRIGHT (C) Copyright 1996 Cinema Graphics, Inc. All Rights Reserved. SUPPORT If you encounter errors in this document, email the author. Please supply the name of the file or manpage, enclose clippings of the erroneous text, and describe the error.


    SOURCE CODE EXAMPLE

    ####
    ####    stree.defs - Stree Defintions
    ####
    
    # Render Options Editor: Define the interface
    roe
    {
        # CLEAR ANY PREVIOUS WIDGETS FROM THE ROE
        clearall
    
        # HEADING
        label
        {
            label      RENDER OPTIONS
            shadowtype XmSHADOW_ETCHED_OUT
            shadowsize 0
        }
    
        # RESOLUTION FIELD
        xyfield
        {
            optionlabel      Resolution
            value            "256,256"
            separatorlabel   X
            
    
            # ENVIRONMENT NAME
            #    This is the name of the environment variable that is saved
            #    into the render_options file, or into the stree file.
            #
            envname         STREE_RES
            envseparator    " "
    
            # CONTENTS FOR THE OPTION BUTTON
            #     text-xy-field expects two comma separated values
            #     followed by optional descriptive text.
            #
            optioncontents
            {
                80,80   (Small)
                100,100
                256,256
                512,512
                800,800 (Large)
            }
    
            # HELP TEXT
            #    This text appears when the user hits the 'i' help button
            #
            help
            {
                Sets the X/Y resolution of the output image.
            }
        }
    
        # PARAMETRIC APPROXIMATION
        xfield
        {
            
            envname         STREE_PARA_APPROX
            optionlabel     Para-Approx
            value           1.0
            forcefloat
            optioncontents
            {
                1.0  (fast)
                2.0
                4.0
                6.0  (slow)
                8.0
                10.0
                12.0 (real slow)
                14.0
                16.0
                18.0 (snail slow)
            }
            help
            {
                This increases the surface detail for displacements
                by adding geometry (subdividing).
    
                The value represents the number of subdivisions for the
                parametric approximation of each patch in the model.
            }
        }
    
        # MAX SAMPLING
        xfield
        {
            
            envname         STREE_MAX_SAMPLES
            optionlabel     Max Samples
            value           1
            optioncontents
            {
                -2 (1 samp/4x4 pixels) Fast
                -1 (1 samp/2x2 pixels)
                0  (1 samp/pixel)
                1  (2x2 samps/pixel) Normal
                2  (4x4 samps/pixel)
                3  (8x8 samps/pixel)
                4  (16x16 samps/pixel) Slow
            }
            help
            {
                Maximum sample rate to use, if difference between two
                neighboring pixels exceeds contrast limits.
                Each pixel is sampled NO MORE THAN pow(2,(2*max)) times.
                0 means one sample per pixel.
                Values greater than zero indicate super sampling.
                Values less than zero indicate inferior sampling.
            }
        }
    
        # MIN SAMPLING
        xfield
        {
            
            envname         STREE_MIN_SAMPLES
            optionlabel     Min Samples
            value           -1
            optioncontents
            {
                -3 (1 samp/8x8 pixels) Fast
                -2 (1 samp/4x4 pixels)
                -1 (1 samp/2x2 pixels)
                0  (1 samp/pixel)
                1  (2x2 samps/pixel) Normal
                2  (4x4 samps/pixel)
                3  (8x8 samps/pixel)
                4  (16x16 samps/pixel) Slow
            }
            help
            {
                Minimum sample rate.
                Each pixel is sampled AT LEAST pow(2,(2*min)) times.
                0 means one sample per pixel.
                Values greater than zero indicate super sampling.
                Values less than zero indicate inferior sampling.
            }
        }
    
        # OBJECT ZOOM
        xfield
        {
            
            envname         STREE_ZOOM
            optionlabel     Object Zoom
            value           -5.0
            optioncontents
            {
                 0.0  (Zoom In)
                -2.5
                    -4.0
                -5.0  (Normal)
                -8.0
                -12.0 (Zoom Out)
            }
            help
            {
                Zooms the object in or out.
                Smaller numbers zoom out.
                Larger numbers zoom in.
            }
        }
    
    
        # OBJECT ROTATION
        xyzfield
        {
            
            headinglabel    Object Rotation
            xenvname        STREE_OBJ_ROTX
            yenvname        STREE_OBJ_ROTY
            zenvname        STREE_OBJ_ROTZ
            xoptionlabel    X
            yoptionlabel    Y
            zoptionlabel    Z
            xvalue          0.0
            yvalue          0.0
            zvalue          0.0
            forcefloat
            xoptioncontents
            {
                "-180.0 (Upside Down)"
                "-135.0"
                _SEPARATOR_
                "-90.0"
                "-45.0  (Pitch Bottom Towards You)"
                _SEPARATOR_
                "  0.0  (Front View)"
                _SEPARATOR_
                " 45.0  (Pitch Top Towards You)"
                " 90.0"
                _SEPARATOR_
                "135.0"
                "180.0  (Upside Down)"
            }
            yoptioncontents
            {
                "-180.0   (Back View)"
                "-135.0"
                _SEPARATOR_
                "-90.0"
                "-45.0   (Pitch Right Edge Towards You)"
                _SEPARATOR_
                "  0.0   (Front View)"
                _SEPARATOR_
                " 45.0   (Pitch Left Edge Towards You)"
                " 90.0"
                _SEPARATOR_
                "135.0"
                "180.0   (Back View)"
            }
            zoptioncontents
            {
                "-180.0  (Upside Down)"
                "-135.0"
                _SEPARATOR_
                "-90.0"
                "-45.0   (Clockwise Twist)"
                _SEPARATOR_
                "  0.0   (Front View)"
                _SEPARATOR_
                " 45.0   (Counter Clockwise Twist)"
                " 90.0"
                _SEPARATOR_
                "135.0"
                "180.0   (Upside Down)"
            }
            help
            {
                Rotates the object around XYZ axes.
                Unlike Renderman, we use 'Z towards You' positioning:
                >    X axes points to your right.
                >    Y axes points up.
                >    Z axes points towards your eye.
                These rotations follow the right hand rule:
                >    Positive X rotation pitches the top towards you.
                >    Positive Y rotation tilts the left side towards you.
                >    Positive Z rotation rolls counterclockwise.
            }
        }
    
        # LIGHT ROTATION
        xyzfield
        {
            
            headinglabel    Light Position
            xenvname        STREE_LIGHT_TRANX
            yenvname        STREE_LIGHT_TRANY
            zenvname        STREE_LIGHT_TRANZ
            xoptionlabel    X
            yoptionlabel    Y
            zoptionlabel    Z
            xvalue          -45.0
            yvalue          45.0
            zvalue          0.0
            forcefloat
            xoptioncontents
            {
                "-100.0  (Left Light)"
                "   0.0  (Center Light)"
                " 100.0  (Right Light)"
            }
            yoptioncontents
            {
                "-100.0  (Bottom Light)"
                "   0.0  (Center Light)"
                " 100.0  (Top Light)"
            }
            zoptioncontents
            {
                "-100.0  (Back Light)"
                "   0.0  (Center Light)"
                " 100.0  (Front Light)"
            }
            help
            {
                Translates the light on XYZ axes.
                We use 'Z towards You' positioning:
                >   X axes points to your right.
                >   Y axes points up.
                >   Z axes points towards your eye.
            }
        }
    
        # RENDERIT FRAME
        frame
        {
            {
                shadowtype XmSHADOW_ETCHED_OUT
                horizontal 2
            }
    
            # RENDER IT
            button
            {
                buttonlabel Render It
                actionto    form
                actionmsg   render
                actionarg   render
            }
    
            # OBJECT
            frame
            {
                {
                    shadowtype XmSHADOW_ETCHED_OUT
                    vertical   2
                    shadowsize 2
                }
                label
                {
            #       resize     false
                    width      20
                    label      Object
                    shadowsize 0
                    justify    right
                }
                chooser
                {
                    envname         STREE_OBJECT
                    value           sphere
                    choosercontents
                    {
                        sphere
                        patch
                        cylinder
                        corner
                    }
                }
            }
    
            # STOP RENDER
            button
            {
                buttonlabel STOP Render
                actionto    form
                actionmsg   render
                actionarg   kill
            }
    
            # RENDER TYPE
            frame
            {
                {
                    shadowtype XmSHADOW_ETCHED_OUT
                    vertical   2
                    shadowsize 2
                }
                label
                {
                    width      20
                    height     10
                    label      Shader
                    shadowsize 0
                    justify    right
                }
                chooser
                {
                    envname         STREE_SHADER_TYPE
                    actionto        form
                    actionmsg       shader-type-changed
                    value           material
                    choosercontents
                    {
                        material
                        displace
                        light
                        environ
                        volume
                        atmosph
                        lens
                        output
                    }
                }
            }
        }
    
        # OK/DEFAULTS
        okfield
        {
            shadowsize              4
            shadowtype              XmSHADOW_ETCHED_IN
            defaults_actionto       roe
            defaults_actionmsg      use-defaults
            defaults_actionarg      noarg
    
            ok_actionto             form
            ok_actionmsg            roe
            ok_actionarg            hide
        }
    
        # OUTPUT IMAGE
        stringinput
        {
            
            label    Output Image
            value    screen
            file     1
            envname  STREE_OUTFILE
            help
            {
                This can either be a filename to render the images to, such as:
    
                >    /usr/tmp/foo.pic
                >    screen
    
                To render images to the screen, you should specify the word 
                screen as the filename.
    
                The filename extensions determine what image format is used.
                Only pic is currently supported.
            }
        }
    
        # FRAME RANGE
        xyzfield
        {
    
            headinglabel    Frame Range
            xenvname        STREE_SFRM
            yenvname        STREE_EFRM
            zenvname        STREE_IFRM
            xoptionlabel    Start
            yoptionlabel    End
            zoptionlabel    Inc
            xvalue          1
            yvalue          1
            zvalue          1
            xoptioncontents
            {
                1
            }
            yoptioncontents
            {
                1
                10
                30
                60
                100
            }
            zoptioncontents
            {
                1
                2
                4
                8
            }
            help
            {
               Sets the frame range when specifying a range of frames to render.
               The values are passed to your custom render script as a series of
               environment variables:
    
               >    STREE_SFRM     - start frame
               >    STREE_EFRM     - end frame
               >    STREE_IFRM     - increment frame
    
               If Start and End are the same value, a single frame test frame
               is rendered (the default).
            }
        }
    
        frame
        {
            {
                shadowtype XmSHADOW_ETCHED_OUT
                horizontal 2
            }
    
            ledbutton
            {
            
                buttonlabel Shadow
                envname             STREE_SHADOW
                state               1
                envon               on
                envoff              off
            }
    
            ledbutton
            {
                buttonlabel Trace
                envname             STREE_RAYTRACE
                state               1
                envon               on
                envoff              off
            }
    
            ledbutton
            {
                buttonlabel Verbose
                envname             STREE_VERBOSE_RENFLAG
                state               0
                envon               on
                envoff              off
            }
    
            # FACE
            frame
            {
                {
                    shadowtype XmSHADOW_ETCHED_OUT
                    vertical   2
                    shadowsize 2
                }
                label
                {
                    width      20
                    label      Faces
                    shadowsize 0
                    justify    right
                }
                chooser
                {
                    envname         STREE_FACES
                    value           both
                    choosercontents
                    {
                        front
                        back
                        both
                    }
                }
            }
    
            frame
            {
                {
                    shadowtype XmSHADOW_ETCHED_OUT
                    vertical   2
                    shadowsize 2
                }
                label
                {
                    width      20
                    label      Viewer
                    shadowsize 0
                    justify    right
                }
                chooser
                {
                    nostreesave
                    resize          false
                    envname         STREE_VIEWER
                    value           default
                    choosercontents
                    {
                        default
                        imf_disp
                    }
                }
             }
        }
    
        # LIGHT FACTOR
        xfield
        {
            
            envname         STREE_SHADOW_FACTOR
            optionlabel     Shadow Factor
            value           0.5
            forcefloat
            optioncontents
            {
                0.0  (dark shadows)
                0.25
                0.50 (medium shadows)
                0.75
                1.0  (no shadows/fast)
            }
            help
            {
                Affects shadows' darkness. You should have 'Shadow' and 'Trace'
                enabled for this to have any affect.
    
                This is the default "soft_point" light's "factor" argument,
                called 'shadow factor' in the mray docs. If > 0, it will blend 
                the color reduced by the shadow shader towards the light color.
                If the shadow factor is 1, no shadow rays are cast.
            }
        }
    
        # LIGHT COLOR
        xyzfield
        {
            headinglabel    Default Light Color
            xenvname        STREE_LIGHT_R
            yenvname        STREE_LIGHT_G
            zenvname        STREE_LIGHT_B
            xoptionlabel    R
            yoptionlabel    G
            zoptionlabel    B
            xvalue          1.0
            yvalue          1.0
            zvalue          1.0
            forcefloat
            xoptioncontents
            {
                "1.0"
                "0.5"
                "0.0"
            }
            yoptioncontents
            {
                "1.0"
                "0.5"
                "0.0"
            }
            zoptioncontents
            {
                "1.0"
                "0.5"
                "0.0"
            }
            help
            {
                Sets the default light color for
                shaders that use the ShadeTree default light.
                This affects the light color in all shaders
                EXCEPT light shaders, which have their own,
                separate controls.
            }
        }
    
        # LOAD DEFAULTS (after defining the interface)
        loaddefaults
    }
    
    # THESE PRE-PROGRAM THE TOOLBAR BUTTONS
    toolbutton 0=add
    toolbutton 1=subtract
    toolbutton 2=multiply
    toolbutton 3=divide
    toolbutton 4=negate
    toolbutton 5=mixed
    toolbutton 6=UserDefined
    
    # DESK SETTINGS
    desk.backgroundcolor            0.37 0.51 0.54  # desk's background color
    desk.rubberbandcolor            0.8  0.30 0.40  # rubberband color for lassos
    desk.connectcolor               0.30 0.15 0.07  # connection line color
    desk.selectedconnectcolor       1.00 0.50 0.00  # selected connect line color
    desk.showvarnames               0               # 0=disable varnames, 1=enable
    desk.zoomminmax                 0.1 10.0        # minimuma and maximum zoom
    desk.linetype                   trace           # line type: trace || direct
    desk.lock                       0               # 0=unlock, 1=lock
    desk.showiconimages             1               # 0=disable images, 1=enable
    desk.statusbar                  1               # 0=disable status bar, 1=enable
    desk.autosavecompiledshaderflag 0               # 0=disable autosave, 1=enable
    desk.boxtint                    0 0 0           # overall tint for boxes (0 0 0)
    #desk.font                      Symbol          # Op Desk font
    
                                                    # (neg numbers = darker)
    # WIDGET WINDOW MANAGER
    #    The window manager class for each slider
    #    See 'man shadetree-streedefs' for possible color values
    #
    wwm
    {
        bgcolor                     basicBackground
        bgcolor.arg_editor_selected alternateBackground5
        bgcolor.box_selected        alternateBackground6
    }
    
    # BOX SPECIFIC SETTINGS
    box.selectedcolor               1.0 0.9 0.8     # selected color for box
    box.hilightedcolor              1.0 1.0 1.0     # color when hilighted
    box.selectedbuttoncolor         1.0 1.0 0.5     # color when button selected
    box.selectedlinewidth           4               # selected linewidth around box
    box.connectlinewidth            3               # ??
    
    # DEFAULT FILE BROWSER DIRECTORIES
    #    Users can override the defaults in their ./stree.defs or ~/.stree.defs
    #
    #    NOTE: Pathnames starting with '.' are assumed relative to the $cwd.
    #          Pathnames that are otherwise relative (dont start with '/') are
    #          relative to $STREE_LIB (eg. /usr/local/shadetree/prman).
    #
    #          Directory names should use '/' or '\\' (eg. c:/temp or c:\\temp).
    streebrowser_dir                examples
    exportbrowser_dir               .
    stringbrowser_dir               examples/textures
    imagebrowser_dir                c:/images
    
    # Maximum number of saved files for the render history
    maxhistory              30
    
    ###
    ### CODE GENERATOR SETTINGS FOR THIS LANGUAGE CONTEXT
    ###
    #codegen.linecomment    //                      # no line comments in rman
    codegen.opencomment     /*
    codegen.closecomment    */
    
    #
    # CLEAR ALL PREVIOUS CODEGEN INTERNAL VARIABLES
    #
    codegen.clearallvariables
    codegen.vararg.sep      ,
    
    #
    # RGB DECLARATIONS
    #       miColor foo_bar;                                # var declaration
    #       miColor foo_bar = STREE_miColorCtor(r,g,b,a);   # var init to constant
    #
    
    codeformat.rgb.declare.head             "miColor "
    codeformat.rgb.declare.tail             ";"
    
    #
    # XYZ DECLARATIONS
    #       miVector foo_bar;                               # vari declaration
    #       miVector foo_bar = STREE_miVectorCtor(x,y,z);   # vari init to constant
    #
    codeformat.xyz.declare.head             "miVector "
    codeformat.xyz.declare.tail             ";"
    
    #
    # FLOAT DECLARATIONS
    #               miScalar foo_bar;       # variable declaration
    #               miScalar foo_bar = 1.0; # variable initialization to constant
    #
    codeformat.float.declare.head           "miScalar "
    codeformat.float.declare.tail           ";"
    
    #
    # STRING DECLARATIONS
    #               char *foo_bar;          # variable declaration
    #               char *foo_bar = "bla";  # variable initialization to constant
    #
    codeformat.string.declare.head          "char *"
    codeformat.string.declare.tail          ";"
    codegen.global-open     append
    
    // global-open //
    
    //  _STREE_INFOSTAMP_
    //  Copyright (c) 1996 Cinema Graphics, Inc. All Rights Reserved
    //
    //  These coded instructions, statements, and computer programs  contain
    //  unpublished  proprietary  information  of Cinema Graphics, Inc., and
    //  are  protected by Federal copyright law.  They may  not be disclosed
    //  to third parties or copied or duplicated in any form, in whole or in
    //  part,  without  the  prior written consent of  Cinema Graphics, Inc.
    //
    //  This  copyright  notice  does  not evidence any  actual  or intended
    //  publication  of such trade secrets, coded instructions,  statements,
    //  and computer programs.
    //
    //  Violators of this copyright will be prosecuted to the fullest extent
    //  of the law.
    //
    #include <stdio.h>
    #include <math.h>
    #include "STREE_shader.h"
    #include "STREE_vector.h"
    #include "STREE_color.h"
    #include "STREE_softshade.h"    /* always need for softimage stuff */
    <<EOT>>
    
    codegen.global-header   append
    
    // global-header //
    <<EOT>>
    
    codegen.main-open       append
    
    // main-open //
    
    _STREE_STRUCT_
    
    <<EOT>>
    
    codegen.main-args       append
    _STREE_MAIN_OPEN_
    <<EOT>>
    
    codegen.main-args-close append
    {
    <<EOT>>
    
    codegen.main-header     append
        // main-header //
    _STREE_MAIN_HEADER_
        miBoolean STREE_return = miTRUE;
    
    <<EOT>>
    
    codegen.main-body       append
    
    // main-body //
    <<EOT>>
    
    codegen.main-close      append
    
        // main-close //
        return(STREE_return);
    }
    <<EOT>>
    
    codegen.global-close    append
    
    // global-close //
    <<EOT>>
    
    # CAST TRANSLATIONS
    #       Translate internal names to preferred names to show to users.
    #
    wordtranslate.clear
    wordtranslate.add       float   miScalar
    wordtranslate.add       rgba    miColor
    wordtranslate.add       xyz     miVector
    wordtranslate.add       string  char*
    
    # SETUP A SOURCE CODE PREFILTER SCRIPT
    #       Script is run relative to $STREE_LIB. See script for details.
    #
    codefilter      bin/codefilter
    
    # COMPILE SCRIPT
    #       Script to compile a 'source shader' into a 'compiled shader', as used
    #       by 'File -> Save Compiled Shader' in the main menu.
    #
    #       Path is relative to $STREE_LIB. $1 will be the shader name,
    #       $2 is the output filename.
    #
    compilecmd              bin/compileshader
    
    # GUI PREFILTER COMMAND
    #       This program accepts gui ASCII information from stdin, and is supposed
    #       to translate it to an appropriate output file (eg. .sli, .cus, etc)
    #
    #       $1 - path to source code file. Use this to determine where to save the
    #            .sli/.cus file.
    #
    guiprefilter    bin/guiprefilter
    
    # FILE EXTENSIONS
    #    NOTE: the 'shaderiface' extension is different, 
    #    depending on the shader type!
    #
    ext.compiledshader      .dll
    ext.shadersource        .cpp
    ext.shaderiface material .mat
    ext.shaderiface displace .dis
    ext.shaderiface light .lit
    ext.shaderiface environ .env
    ext.shaderiface volume .vol
    ext.shaderiface atmosph .atm
    ext.shaderiface lens .len
    ext.shaderiface output .out
    ext.renderiface .mi
    
    # GENERIC DATATYPE
    #       Clear all previous (start from scratch)
    datatype.clearall
    
    # NOTE: next four datatype declaration supercede obselete "codeformat" definitions...
    
    datatype.add
    {
            name            "rgb"
            declarehead     "miColor "
            declaretail     ";"
    }
    
    datatype.add
    {
            name            "xyz"
            declarehead     "miVector "
            declaretail     ";"
    }
    
    datatype.add
    {
            name            "float"
            declarehead     "miScalar "
            declaretail     ";"
    }
    
    datatype.add
    {
            name            "string"
            declarehead     "char* "
            declaretail     ";"
    }
    
    # GENERIC DATA TYPE: Define the RGBA data type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "rgba"
    
        # When declaring a variable of this type..
        declarehead       "miColor "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define a 'file pointer' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "FILE*"
    
        # When declaring a variable of this type..
        declarehead       "FILE *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define a 'void pointer' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "void*"
    
        # When declaring a variable of this type..
        declarehead       "void *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miTag' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miTag*"
    
        # When declaring a variable of this type..
        declarehead       "miTag *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miType' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miType"
    
        # When declaring a variable of this type..
        declarehead       "miType "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miImg_image' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miImg_image"
    
        # When declaring a variable of this type..
        declarehead       "miImg_image "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miLock' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miLock"
    
        # When declaring a variable of this type..
        declarehead       "miLock "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miBoolean' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miBoolean"
    
        # When declaring a variable of this type..
        declarehead       "miBoolean "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miMatrix' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miMatrix"
    
        # When declaring a variable of this type..
        declarehead       "miMatrix "
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miMatrix*' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miMatrix*"
    
        # When declaring a variable of this type..
        declarehead       "miMatrix *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'Tex*' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "Tex*"
    
        # When declaring a variable of this type..
        declarehead       "struct Tex *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'DisTex*' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "DisTex*"
    
        # When declaring a variable of this type..
        declarehead       "struct DisTex *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'EnvTex*' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "EnvTex*"
    
        # When declaring a variable of this type..
        declarehead       "struct EnvTex *"
        declaretail       ";"
    }
    
    # GENERIC DATA TYPE: Define an 'miInteger' type
    datatype.add
    {
        # The 'lookup name' for this datatype
        name "miInteger"
    
        # When declaring a variable of this type..
        declarehead       "miInteger "
        declaretail       ";"
    }
    
    exportoptions
    {
            streedir                        0       ./
            shadersourcedir                 1       ./
            compiledshaderdir               1       ./
            shaderinterfacedir              1       ./
            renderinterfacedir              0       ./
            postsavescript                  0 
    }