'Select Similar' for the UV Editor - begin implementation of T47437
Closed, ArchivedPublic

Description

Summary

This is the basic structure for implementing a Select Similar tool for UVs. The first iteration here contains code only for selecting UVs by similar UV area, but it is general enough that adding new tool properties should be straightforward.

Testing

Right now the tool can be tested by the doing the following:

  • open the UV editor
  • switch to UV Face mode
  • select 1 or more UVs
  • press Shift-G to open the 'Select Similar' menu

Questions

There are a few points I need guidance on:

  1. Some of the code was copied from bmo_similar.c and editmesh_select.c. Is there a suggestion for how to reuse that code? As this is my first Blender dev project, I don't know how far I should go in rewriting/refactoring existing code.
  2. I noticed there is some UV manipulation code in the bmesh system (e.g., source/blender/bmesh/operators/bmo_utils.c), but mostly it's contained in uvedit_ops.c. Should this feature be implemented using the bmesh system or should I continue the way I have so far?
  3. The way it is now, when UV faces are hidden (e.g., when associated mesh faces aren't selected) their selection isn't changed. In other words, UVs will only be selected if they are visible, but if they are already selected AND hidden they will remain selected. Is the proper functionality?
Maintaining

As an aside, if this tool eventually makes its way into master I'd be interested in maintaining it in the future.

Details

Differential Revisions
D2738: Basic Select Similar tool for UVs
Type
Patch