The motivation of this script is to get a better placing of uv-verts especially for straight meshes like architectures.
This script has two functions:
- Aligning all marked UV-Verts to the background-raster, the resolution can be selected by a drop-down-box and is a multiple from 1/256.
This function is rather simple, it just makes a rounding of the marked verts
- Aligning a marked line of connected UV-Verts so that they are making a straight line from the starting point to the ending point. The ratio of the UV-Verts represent the ratio of the associated line in the Mesh
I have made a short video (half a minute) to show this script in action:
You will see, that after a rough setting of points i several times use the first function (rounding), and all the verts go rather in a mess. Anyway - after a recalculation only the pinned verts remain exactly at their position.
After that i select lines of connected uv-verts and straighten them by the second function and pin them.
In the end i get a rather good straightend UV-Map to fit to an image, i made with InkScape.
You will find the script here: