Chapter 5 · The TnpixPreset Interface

5.1Functions

FunctionReturnsWhat it does
folder()stringThe presets folder: the one chosen on the Presets rollout, remembered on this computer, or Documents\TenPix Cloth\Material Presets.
setFolder pathbooleanChooses the presets folder and remembers it.
names materialstringThe presets in the folder that belong to this kind of material, one name per line.
save material pathbooleanSaves every dial of the material, with its tick, to the file.
load material pathintegerLoads a preset: every dial returns to its default and then takes the preset's value. Returns how many values were applied, or −1 if refused. Undoable.
text materialstringThe material's current values in preset form.
recycle pathbooleanMoves a preset file to the Windows Recycle Bin.
why()stringWhat the last save, load, setFolder or recycle did, or why it was refused. After a load it reads applied N missing M unknown K bad B.