This patch aims to add similar selection for edge direction and length to the UV editor's select similar operator (also created in this diff). The diff is based on D4792. It is not yet a complete solution to T47437, however to my knowledge edge direction and length selection work without problems.
A few things to keep in mind:
- Please let me know if there are any problems in the functionality of this code, I will fix them ASAP
- I am using a simple arctan (atan2f) to calculate edge direction in UV space, please let me know if this isn't correct/is suboptimal.
- As this shares code with editmesh_select_similar, the operator still exposes all the same edge select options as in the mesh editor. I am not sure if all of them (i.e. select by number of faces connected) are applicable to the uv editor, and if not, how to remove them. Please let me know about this!
- If any code is suboptimally written I would love to get feedback.