Page MenuHome

Implement a UV select overlap operator

Authored by Jesse Y (deadpin) on Mon, Aug 5, 11:32 PM.



This patch implements a UV Select Overlap operator. It was first attempted by another volunteer as part of another change (D2865) but it was never updated with the feedback given.

The patch below incorporates said feedback as well as allows the operator to work correctly in multi-object edit mode.

The 2d tri-tri overlap test exhibits good behavior in a variety of cases (e.g. very tiny overlaps in a crowded UV layout; no false positives) but my corpus of available UV's is limited. It detected a valid overlap with the 2.80 splash screen .blend and it handles my test file which will be provided below.

Performance: A 100k vertex model takes about 0.5 seconds to detect overlaps (full operator cost) on a Xeon E5-1620 (6 years old). For a rough comparison against how long UV operators sometime take, a UV Smart Unwarp for the same model takes 14 seconds.

Diff Detail

rB Blender
uv_select_overlap (branched from master)
Build Status
Buildable 4301
Build 4301: arc lint + arc unit

Event Timeline

Test .blend:

Result from running operator:

Thanks, committed rBdafecfa683a8d7e1684bd930da02dfaa01aabadb with some improvements.

  • Don't operate on UV's that aren't visible.
  • const usage caused a lot of errors in GCC.
  • Calculate the total number of UV triangles needed, since the visible number may be far less than all meshes triangles.
This revision is now accepted and ready to land.Wed, Aug 7, 5:31 PM