A refactor of the margin calculation of UV packing, in anticipation of multiple packing methods soon becoming available.
Three margin scaling options are now available:
- "Add", Simple method, just add the margin. This is the default margin scale from Blender 2.8 and earlier. [0]
- "Scaled", Use scale of existing UVs to multiply margin, the default from Blender 3.3+
- "Fraction", a new (slow) method to precisely specify a fraction of the UV unit square for margin. [1]
The "fraction" code path implements a novel combined search / secant root finding method which exploits domain knowledge to accelerate convergence while remaining robust against bad input.