RVMAT Templates
RVMAT template specification
RVMAT Templates are used by the Templates tool of the Materials tools. A template is essentially a normal RVMAT file, with the exception that it has special place holder values where file paths should be automatically inserted.
Custom templates can be added through the Custom Data JSON file.
Process
The templating process will take the selected folder path, texture set name and the specificed template file and process it through the following steps:
locating placeholders
precomputing possible acceptable file paths for all placeholders
determining final values:
if Ensure Files Exist is enabled:
check which acceptable files exist
if no files exist, use default value of the placeholder
otherwise use the first acceptable path
otherwise:
use first acceptable file regardless of whether or not it exists
substituting final values (file paths are made relative to the Project Root of the add-on preferences if possible)
writing output file
Placeholders
A placeholder consists of 3 parts wrapped in <
and >
symbols, and separated by |
symbols.
comma separated list of accepted texture type suffixes (eg.:
NO,NOHQ
)comma separated list of accepted file types (e.:
TGA,PAA,PAC
)default value (eg.:
#(argb,8,8,3)color(0.5,0.5,1,1,NOHQ)
There should be no spaces in the texture and file types lists, and no spaces around the separating
|
characters.The placeholder as a whole, or the default value should not be wrapped in quote marks, the templating process will insert them automatically.
Example
Last updated