Defaults

The Defaults section specifies the UI attributes for the properties defined in the PropertySet section.

The Defaults section contains a named block for each property. Each block begins with the name of a parameter followed by a series of attribute specifications enclosed in braces.

Defaults
{
   parameter_name {
       Name = "name";
       Description = "description";
       [UIAttr = attributes;]
       [UIRange = min to max [by step];]
       UIType = "type";
       Items {
          type_attribute = value;
       }
       Commands guids
   }
   ...
}

Name

A concise, descriptive name for the parameter. It is used in the user interface as a label on the property page.

Description

A brief sentence fragment. It does not appear in the user interface.

UIAttr

Optional comma-separated list of flags:

Flags

Description

disabled

Disables the associated user interface control

exclusive

Specifies that a group of items is mutually exclusive

hidden

Hides the associated user interface control

UIRange

UIRange specifies the range of values that can be entered in the control. This is not necessarily the same as the range of possible values for the property (defined by value minimum and value maximum in a Parameter section). Applies to scalar, integer, and vector types.

step specifies the increments by which the value displayed in the control can change.

UIType

UIType specifies the type of control. Must be enclosed in double quotes.

Control type

Description

"Bool"

True and False radio buttons. Assigned by default to Boolean parameters.

"BitmapWidget"

Displays a bitmap. The file path name can be absolute or relative to the directory which contains the SPDL file. Only .bmp files are supported. Must use “/” and not “\” slashes. The name of the file must be specified with its extension (<myfile>.bmp).

See Displaying Bitmaps for more information.

"Check"

Check box.

"Combo"

Combo box. Use the Items keyword to specify the combo box contents.

"Iconlist"

Displays iconic radio buttons. The following optional attributes control their behavior:

nocol
Arrange the bitmaps in this number of columns as much as possible (default = as much as line space allows).

noline
Arrange the bitmaps in this number of lines as much as possible (default = 1).

colgap
Specifies number of pixels to leave horizontally between bitmaps (default = 3).

linegap
Specifies number of pixels to leave vertically between bitmaps (default = 3).

selcolor
Specifies color of the selection box highlight (default = 0x00FFFFFF, white).

useselicon
Uses alternate selection bitmap files instead of the selection box highlight when set to True (default = False).

Note: Use the Items keyword to specify the radio button bitmap files and values. For more information, see Items.

"ImageBrowser"

A text box that displays the name of the image clip, along with an Edit button and a New button.

The New button lets users create a new image clip or select a different image clip.

The Edit button pops up the property pages for the image clip.

Note: The ImageBrowser control type is specific to the shader SPDL file only.

"LightList"

Allows the user to pick one or more lights in a scene.

See the Bionic_Lens or FLARES.LEN Phenomena for examples.

Note: The LightList control type is specific to the shader SPDL file only.

"Number"

Numeric entry control. Assigned by default to integer, double, and float parameters.

"Radio"

Use the Items keyword to specify radio buttons. For more information, see Items.

"ReferenceWidget"

Allows the user to select multiple or single objects to be passed to the shader.

"RGB"

Color control with no Alpha slider. Use the following syntax:

UIType = "RGB", 3;

"RGBA"

Color control with Red, Green, Blue, and Alpha sliders. Use the following syntax:

UIType = "RGBA", 4;

"Static"

Displays a parameter value in a static text field.

"String"

Text entry control. Assigned by default to string parameters.

You can also use a CLSID as a UIType value:

   DEFINE_GUID( CLSID_ImageBrowser, 0x62209701, 
       0x7f06, 0x11d2, 0xbf, 0x3e, 0x0, 0xa0, 0xc9, 
       0x82, 0xce, 0x5d);
   ...
   UIType = CLSID_ImageBrowser;

or a ProgID

   UIType = "ImageBrowserItem.ImageBrowserItem.1";

Items

List of items to display in the control. Used to define radio buttons, iconic buttons, and combo boxes.

An item list is defined like this:

Items
{
   "name1" = value1
   "name2" = value2
        ...
}

In the example above, nameN is the text that appears in the control and valueN is the value assigned to the property when the item is chosen. For example, if you have defined an iconic radio button, you need to specify the location of the BMP file and the value of the button it is associated to:

Items
   {
       "<factory_path>/Application/spdl/bitmaps/BitmapA.bmp" = 1
       "<factory_path>/Application/spdl/bitmaps/BitmapB.bmp" = 2
       "<factory_path>/Application/spdl/bitmaps/BitmapC.bmp" = 3
       "<factory_path>/Application/spdl/bitmaps/BitmapD.bmp" = 4
   }

 

Make sure you use a forward slash (“/”) in the path and that you include the “.bmp” extension in the file name. You can use one of the following types of paths:

• An absolute path name.

• A relative path name in the directory containing the SPDL file.

• A dummy path name to leave a hole in the displayed arrangement of iconic radio buttons.

Bitmaps are the only supported file format for iconic radio buttons.

Commands

GUIDs of command buttons to display beside the input control. For example, this adds the Connection button:

Commands = "{F5C75F11-2F05-11d3-AA95-00AA0068D2C0}";

The Connection button pops up a list of common shaders that can be connected to a parameter.



Autodesk Softimage v7.5