Added operator to select verts based on vertex group count
Open, NormalPublic

Description

The operator selects all verts based the number of vertex groups they are contained in. The inputs are operation type (equal, greater than, less than), the comparison number, and of course selection extend. I calculated the number of vertex groups an object has by iterating over all the groups. I could not if that information is stored anywhere. Please let me know if there is a better way to do this.

Details

Type
Patch

what would a typical use case be like?

I think it could be helpful if you clean up a weight painted mesh and want to select the vertices with

  • no weight (not moved by any bones),
  • only one weight (moved by only one bone, in this case the weight value can fail you sometimes),
  • more than two weights (maybe unnecessary "garbage" weights).

Agree with @Fazekas Laszlo (totoro), these 3 options make sense, but not sure why you would for example - want to select vertices used by 4+ vertex groups.

Sergey Sharybin (sergey) lowered the priority of this task from "Normal" to "Incomplete".May 6 2015, 4:56 PM

I initially wrote the functionality to help with real time application performance. For instance, the Unity game engine only supports up to 4 vertex groups per vert, and it has options to set it to 1, 2, 3. Even if you are under the limits, it can have performance issues if you use too many groups-- depending on your mesh density, target OS, number of animated models, etc. Other applications may have different limits as well. Additionally, if you do go over the limits in Unity's case, you will end up with unexpected animation results and it can be difficult to figure out why.

Bastien Montagne (mont29) raised the priority of this task from "Incomplete" to "Normal".May 15 2015, 5:45 PM

Maybe we could add an enum/invoke behavior (to get short menu with three options above) as 'default access'? But think keeping generic 'advanced' behavior is indeed best, even if not directly exposed to user.

Too late in release cycle to merge this now anyway imho, will have to wait after 2.75.