Chapter 2 · Examples

2.3Quality in Script

substeps is the number the Solver panel shows, the same number everywhere (4 is the default).

s = $.modifiers[#Tnpix_Solver]
s.substeps       = 8        -- the High step, as on the panel
s.iterations     = 4
s.contactPasses  = 4        -- contact passes rise with iterations
s.stretchQuality = 4
format "substeps: %\n" s.substeps

What you should see: the panel shows Substeps 8, Iterations 4, Contact passes 4, Stretch quality 4. The next play simulates again with the new quality: steadier cloth in fast motion and a proportionally slower solve. To simulate again without changing anything, call TnpixTool.reset().