Skip to content

Definition Format

infinity8 edited this page May 31, 2018 · 8 revisions

The definition supports a fair number of different element types, detailed below. The available types and their parameters are defined in the core.xmldef file.


General Parameters

The following parameters are found on all types.

Name

This specifies the name that this element will be written out with.

SkipIfDefault

When set to true this will skip writing this element if it is at its default value.

VisibleIf

This allows for specifying a simple expression to conditionally hide/show an element. Consists of a series of boolean expressions seperated by && or ||.

TextColour

The colour of the name of this element in the ui.

Tooltip

An optional tooltip to show on mouseover for this element.


Primitive

Primitive types are the types that can be represented simply as a single string. This means they can be converted into comma seperated lists by structs / collections that are set to collapse. Primitives also allow for specifying a default value.

Boolean

This represents a simple true/false value.

Colour

This represents a colour, with optional alpha. Is written out as a comma seperated list of 0-255 values, in the order rgb (or rgba if using alpha).

Enum

This represents a collection of values that can be chosen from. The values can be specified within this element or loaded from another location by using the enumdef element.

File

This represents a filepath, relative to the project root. An optional extra path can be specified to change the base path if desired. Additionally the allowed file types can be configured.

Number

This represents a number. It can either be a int or float, and you can also set a min and max value allowed.

String

This is a string. Nothing fancy here.

Vector

This represents a mathematical vector. These values will be joined by commas when written out. You can pick the number of components (2-4) and the names to give those components.


Complex

Collection

This represents a collection of the specified child element. Can set a min and max count, and can also be collapsed (converted into a seperated list) if the child is a primitive type.

GraphCollection

This represents a collection that is present as its own node in the Graph view.

GraphStruct

this represent a struct that is present as its own node in the Graph view.

Multiline String

This represents a string that spans multiple lines. It has the option of having each line written out as its own element, or for the lines to be in a single element but seperated by \n characters.

Reference

This represents a struct or collection imported from somewhere else. The allowed names are listed in the Keys field.

Struct

This is the main structure defining element type. This contains a set of other elements. Can be set to collapse if all the children are primitives. Additionally a 'ChildAsName' can be set to use one of the children as the element name when written out.

Timeline

This represents a timeline of keyframes that can also contain values. The other values can have an interpolated preview shown in the ui. This is identical (data side) to a collection containing a struct.

Tree

This represents a tree of strings.