...
Here we define a set of rules that will all be executed in the file's order. The key string should evaluate as a python expression and return True once substituted.
There are a number of available substitution tokens:
...
Code Block | ||||
---|---|---|---|---|
| ||||
"'_i8t' in '%(img_name)s'": { "args": { "texture_format": "tiff", "data_type": "byte" } } |
... matches "_i8t
" in the image name, which is here interpreted as shorthand for "8 bits integer tiff format" and sets the texture format to "tiff
" and the image to "byte
" (8 bits integer, see txmake documentation). For example, a file named "roof_top_i8t_v01.png" would match that rule.
Of course, you can create more sophisticated tests by using the and
and or
keywords.
Code Block | ||||
---|---|---|---|---|
| ||||
"'%(img_type)s' == 'float' and %(img_depth)d > 16" |
The standard rules tend to rely on the node_type, img_type
and img_depth
to pick the best file format and compression algorithm.