CREATING YOUR OWN GROUP TYPES

This section is an explains how to define group types in the file Janus_GroupTypes.cfg.

Basics
The formatting of Janus_GroupTypes.cfg is similar to an INI file. A group type is first defined by enclosing the group type name between brackets ([,]). Whitespaces are not allowed:

[MyCustomGroup]

Right after the declaration of your group name, the group definition begins. Let's start with an example:

[MyCustomGroup]
GLOBAL.UBC=false
ACTIVE.UBA=surface
OTHER.MATTECOLOR=255,255,255

The first element (e.g. GLOBAL, ACTIVE, OTHER) is called the group indicator and it refers to how the group is treated by the command. If the group is considered to be an active group then it will execute this parameter on the group. Also note that it is case-insensitive. These are the definitions of the group indicator:

After the group indicator the directive is specified. In group types, only group directives are meaningful. The directive is then followed by a equals sign (=), and then the appropriate value is written down.

Whitespaces to left or right of the equals sign is not allowed.

Syntax
As explained in the overview, directives executed as a subcommand is different syntactically when it is used as a directive in a group type. For group types, only group directives are allowed. Directives have certain forms of values they expect. Here are the possible value forms.

ON-OFF Directives - True or False
Group directives that are expressed in ON or OFF values in subcommands are translated into group types by the use of 'true' or 'false', or interchanged with 'unseen' or 'seen', respectively.

'Unseen' and 'seen' values, however, apply to only UBC, UBR, and UBF.

UBC=[[true|false] | [seen|unseen]]
UBR=[[true|false] | [seen|unseen]]
UBF=[[true|false] | [seen|unseen]]

UBA Directive
UBA (Alpha Channel) have different values altogether.

UBA=[[surface|usesurface] | [black|constantblack] | [unaffected]]

Integer Directives
Integer directives are straightforward. Input an integer after the equals sign.

RAYLIMIT=4

Floating-Point Directives
Floating-point number directives are also simple. Input a floating-point number after the equals sign. Remember that 1.0 is 100% and .5 is 50%.

LTINTENSITY=1.5

Color Directives
Color values are written identically to subcommands (0-255 and separated by commas), except, of course, that it follows the standard group type syntax with the equals sign:

MATTECOLOR=255,5,125

String Directives
Directives requiring a single or double string is written as you would in subcommand.

REPOBJ="searchObject.lwo""replaceObject.lwo"
REPOBJ="replacementObject.lwo"

Data Block Directives
Data Block directives (CLIPDATA, DISPDATA, NODEDISPDATA, APSRENDERDATA, and LTPROJIMAGE) have an extended syntax and is markedly different from how they are written as subcommands. First you supply a mode which range from 0 to 2.

If 2 is used, it must be followed with a colon (:) and a string representing the name of the pre-saved data block enclosed in quotation marks. Mode 2 requires a pre-saved data block of their type. These pre-saved data blocks are contained in the in Janus_PLUGINDEF.cfg saved under the current project's root folder.

CLIPDATA=0
DISPDATA=2:"dispDataPreset"

Group Inheritance
Groups have a special directive called INHERIT that allows the group to inherit the settings of another group. Inheritance is non-recursive, however, so that you cannot inherit another inheritance from the group.

INHERIT=”<groupToInherit>”

Example:

[alphaBlack]
GLOBAL.UBA=black

[matteBlack]
inherit=alphaBlack
GLOBAL.MATTEOBJECT=true
GLOBAL.MATTECOLOR=0,0,0

[matteWhite]
inherit=matteBlack
GLOBAL.MATTECOLOR=255,255,255

In the case of [matteWhite], it only inherits the main parameters of [matteBlack], namely, GLOBAL.MATTEOBJECT=true, and GLOBAL.MATTECOLOR=0,0,0, not GLOBAL.UBA=black from alphaBlack. You wish to inherit [alphaBlack] you must directly call it:

[matteWhite]
inherit=alphaBlack
inherit=matteBlack
GLOBAL.MATTECOLOR=255,255,255

This tool of inheritance makes it easier to create group types (and command types) from simple building blocks. It also makes their creation easier to understand. Note that you can inherit as many groups as you want, although you cannot inherit an inheritance of another group (non-recursive).

'Comment' Directive
A 'comment' directive allows you to describe your group type. Only one comment directive is allowed (the latest one read will be used). Janus appends these comments beside the actual group type in the G popdown in GUI.