Item template description file
- Last UpdatedMay 21, 2025
- 2 minute read
The template description file describes the template and the sequential actions to be executed in order to instantiate it.
There are three elements in the file:
-
The item_template descriptor node. This describes the template and its characteristics.
-
The instancing statements. The sequential steps needed to perform template instancing.
-
The placeholder tags. Helper functional tags.
Code example
This is a code example of the template description file.
<?xml version="1.0" encoding="utf-8"?>
<item_template name="CircleArc" group="Base|Utility" description="Creates an CircleArc node.
The CircleArc node displays a portion of a plane circle defined by the center and two points.
It can be used to identify and highlight 2D angles." image="image.png" params="T_NAME"
default_NAME="circlearc_" tags="utility" >
<copydir from="%T_TEMPLATEDIR%\models" to="%T_USER_MODELS_DIR%"/>
<copydir from="%T_TEMPLATEDIR%\textures" to="%T_USER_TEXTURES_DIR%"/>
<createnode name="%T_NAME%" type="CircleArc" faces="128" mwxTemplate="user/circlearc_template.mwx" visible="true"
texture="circlearc_template.png" center="%T_IN_FRONT_OF_CAMERA_POSITION%"
pointA="%T_IN_FRONT_OF_CAMERA_POSITION_SHIFT_X_1%" pointB="%T_IN_FRONT_OF_CAMERA_POSITION_SHIFT_Z_1%"/>
</item_template>
The template descriptor node <item_template/>
The root node of the file is used to define the template characteristics.
|
Attribute |
Use |
Description |
|---|---|---|
|
default_NAME |
Optional |
If T_NAME is used in the param, then default_NAME is used to automatically populate the field by inserting the instance name with a default name. |
|
description |
Optional |
Text that describe the characteristics of the item. |
|
group |
Mandatory |
This field is used to define the position of the template in the Create Item From Template Editor tree. Each level of the group must be separated by a | like Base|Scene. |
|
image |
Mandatory |
The image to be displayed in the Create Item from Template Editor. |
|
name |
Mandatory |
Name of the template to be shown in the Create Item From Template Editor. |
|
param |
Optional |
Specific placeholder tags can be set in this attribute to customize the behavior of the Create Item From Template Editor. In this field the tags doesn't need to be enclosed by %. T_NAME enables the field for inserting the instance name. T_EMITTERS enables emitters number dropdown visibility. |
|
tags |
Optional |
Comma-separated list of tags for the item. Tags are used for filtering the item templates in the creation interface. |