2
$\begingroup$

Is there an add-on or way to limit the selection vertices in a vertex group by a given weight range? Example: with a vertex group A selected, select only verts weighted between 0 and .05 to that group? Thanks!

$\endgroup$
4
$\begingroup$

Thanks. Here is the python script I wrote to select vertices of a specific vertex group, but only within a specific range:

import bpy

minWeight = .6
maxWeight = .7
vertexGroupIndex = 1

bpy.ops.object.mode_set(mode = 'EDIT') 
bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.select_all(action = 'DESELECT')
bpy.ops.object.mode_set(mode = 'OBJECT') # Switch to Object to get selection
obj = bpy.context.active_object 
verts = [v for v in obj.data.vertices]
for v in verts:
  weight = v.groups[vertexGroupIndex].weight
  if weight <= maxWeight and weight >= minWeight:
    v.select = True
bpy.ops.object.mode_set(mode = 'EDIT')   
$\endgroup$
0
$\begingroup$

One way to go is to copy the vertex group and use the tools Invert (so that low weights become high), Levels (Gain1, Offset to -0.905) and Clean (to remove all with weight 0, which were higher than 0.05 at the beginning) to cut off everything else. Then you can select those remaining vertices as usual.

But this is rather time consuming. If you need to do that a lot, I recommend writing a python script yourself.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.