Functional statements
- Last UpdatedMay 21, 2025
- 2 minute read
This page contains special template instancing statements that can be used to invoke graphic context behaviors.
The function <function/>
The function statement is used to invoke a special template instancing function.
|
Attribute |
Use |
Description |
|---|---|---|
|
name |
Mandatory |
The name of the function to invoke. |
Available functions
These are the available function statements.
|
Function |
Description |
|---|---|
|
addmwx |
Opens a file dialog for selecting an Mwx file to be used to create a Mwx node. |
|
addrfc |
Opens a file dialog for selecting an Rfc/Gcd file to be used to create an Rfc node. |
|
addspc |
Opens a file dialog for selecting Spc files to be used to create an Spc node. |
|
addmaterial_item |
Opens an item selector panel for selecting one or multiple item nodes. This function creates all needed Material nodes for each selected item. |
|
addmaterial_mesh |
Opens the mesh selector panel for selecting one or multiple nodes. This function creates a Material node for each selected mesh. |
|
addmesh |
Opens the mesh selector panel for selecting one or multiple meshes. This function creates the corresponding Mesh nodes. |
|
addobject |
Opens the object (group) selector panel for selecting one or multiple meshes. This function creates the corresponding Object nodes. |
|
addlodcontainer |
Opens the mesh selector panel for selecting one or multiple meshes. This function creates the corresponding LODContatiner nodes. |
|
addmanipulable |
Opens the Item selector panel for selecting one or multiple meshes. This function creates the corresponding Manipulable nodes. |
|
addanimation |
Opens the Animation selector panel for selecting one or multiple animations. This function creates the corresponding Animation nodes. |
|
addanimationgeometry |
Opens the AnimationGeometry selector panel for selecting one or multiple animated geometries. This function creates the corresponding AnimationGeometry nodes. |
|
reloadshaders |
Reloads the ShaderLibrary. |
The logger <log/>
The log statement is used to report a text to the user interface.
|
Attribute |
Use |
Description |
|---|---|---|
|
text |
Mandatory |
The content of the log text will be prompted in the user interface. |
Notes about logging
Most of the template instancing statements automatically generate a log that is displayed in the user interface. These logs can be overridden by provisioning the statement with a ___logMessage field.
Example:
<createnode name="mwx_%T_NAME%" type="Mwx" file="user\XRSLibrary_PrimitiveBox.mwx" replace="T_NAME=%T_NAME%" ___logMessage="You did it, the MWX has been created!!!"/>