New operator with the following options for align rotation:
- find edges that aligns to each other within -45 to +45 degrees in UV space
- Align the uv island sho that the average of all those edges is aligned to 0 degrees (i.e along the Y/V axis)
World space X, Y, Z
- find edges that aligns to each other within 90 degrees along world axis X, Y or Z
- Align the uv island to the average of all those edges
Align rotation - auto
Auto align rotation to UV space
I’m not sure what the best algorithm would be. With simpler box shapes it would perhaps work with calculating the angle of all edges and filter out the ones that have -45 degree to +45 degree. Calculate the average of all those edges and then align the rotation of that average edge value so the degree is 0.
Align rotation - to world axis
Make options to align other axes in object space as well (x, y)
Align rotation 3d viewport axis (align to 3d world +Z in this example)
Filter out edges that aims along the Z axis (or close to it). Then align rotation of the uv island so that those edges aims along the V axis in UV space.
Align rotation - to selected edge
Align rotation to selected edge.
Rotate the uv island so that the selected edge is aligned to aim along the V axis in UV space.
Should work per uv island where one edge is selected per uv island