[SESI logo]

Houdini Development Toolkit - Version 6.5

Side Effects Software Inc. 2004

Customizing UI

Customizing .ui files

Although normally one should avoid editing ui files in Houdini as much as possible it is sometimes desirable to modify a parameter dialog file created when a new custom operator is created in order to change the layout or hide parameters. This page will provide a brief overview of some of the main features of the ui file syntax. It is not intended to provide a complete specification but should make it easier to modify existing files.

The purpose of ui files in Houdini is to create the interface components and specify some of the connections between components and the application. Creating components also implies what we refer to as "laying them out" or defining their size and position relative to each other. The ui grammar uses keywords and tokens to define the interface components and specify their attributes. Keywords that specify a type of something or an attribute name are usually all upper case whereas keywords that specify a value are usually all lower case (there may be exceptions to these rules).

The statements within a ui file are one of two types, either an interface component definition or a command. User interface components fall into two main categories which we refer to as containers and primitive gadgets. Containers are basically collections of primitive gadgets and/or other containers.

Containers

Containers in the grammar are specified with the following syntax:
    <container type>
    {
	<attributes>

	<contents>
    }

The components within a container are often referred to as children of the container while the container is the parent of the contents.

The container type may be left out completely, in which case the braces imply just a simple container with no special behaviour. The most important container types are:

WINDOW
DB_WINDOW
RGB_WINDOW
DB_RGB_WINDOW
BEST_WINDOW
BEST_RGB_WINDOW
The window container types must be immediately followed a title string in double quotes and then by the optional keyword "noborder" and/or an iconic name contained in double quotes. (e.g. RGB_WINDOW "This is the window title" noborder { ... } )

BUTTONSTRIP <striptype>
<striptype> is one of: This container is used to define strips of buttons or menus.

SCROLLER <layout>
<layout> is defined below.
This container creates a scroll region that includes scroll bars.

SCROLLEREGION
This container creates a scroll region without scroll bars.

SWITCHER
The value of this container (see below) causes it to switch between it's children.

Primitive Gadgets

Primitive gadgets in the grammar are specified in the form:
    KEYWORD [parameters] <attributes> ;

Note the semi-colon at the end of a primitive gadget definition which is mandatory. Attributes are always optional and are discussed below. A given primitive keyword may or may not have parameters associated with it which are positional and thus must be given in the correct order.

It is beyond the scope of this document to list all possible gadgets and their parameters. Many of the important ones may be inferred by examination. For the purposes of dialog customization it should be sufficient to concentrate on some of the key component attributes.

Attributes

Attributes apply to both containers and primitive gadgets although some are meaningless when used on one or the other type. One of the key container attributes is:
    LAYOUT( <layout> )
The <layout> is one of: The '!' suffix implies a conforming layout which means that all members of the container will be conformed to be the same width and/or height depending on the layout direction.

The '>' suffix implies a right and/or top justification layout.

The '%' suffix implies a centered justification.

No suffix implies the default of left and/or bottom justification.

The attribute:

	STRETCH(h, v)
takes h and v as boolean values (zero or one) and indicates whether or not the component will be allowed to stretch in the horizontal and/or vertical directions.

The attribute:

	SIZE(h, v)
where h and v are floating point expressions, specifies the size of a gadget in inches. If either is zero then the size will be computed using the layout rules. Note that layout rules may still override the size specified, especially if the gadget is stretchable or if the container has a conforming layout.

The attribute:

	MOVE(h, v)
where h and v are floating point expressions, specifies the location of a gadget within it's parent in units of inches. Note that positioning of gadgets usually only applies if the parent container has a layout of "none" since the layout rules will override a manual position specification.

The attribute:

	MARGIN(border, spacing)
where border and spacing are floating point expressions, specifies the amount of border space to place within the outer edges of a container and the inter-gadget spacing to use between contents. Both are specified in inches.

The attribute:

	DISABLED
will disable the corresponding gadget.

The attribute:

	LOOK(...)
takes several different forms and is used to specify the what the gadget looks like. Please see examples of it's usage if you need to change details of a gadgets look.

The attributes:

	VALUE(name)
	SCROLLVALUE(name[, name])
are critical for connecting gadgets to other gadgets and to the application code. Existing value names should never be modified else one risks disabling the dialog.
Table of Contents
Operators | Surface Operations | Particle Operations | Composite Operators | Channel Operators
Material & Texture | Objects | Command and Expression | Render Output |
Mantra Shaders | Utility Classes | Geometry Library | Image Library | Clip Library
Customizing UI | Questions & Answers

Copyright © 2004 Side Effects Software Inc.
477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7