2
$\begingroup$

A custom model exporter gives me an error: "Could not load a vertex: Unweighted vertex found !"

How can I find these vertices ?

$\endgroup$
3
  • 4
    $\begingroup$ How about a little more vital information? $\endgroup$ Aug 7, 2016 at 17:47
  • $\begingroup$ I need to find the unweighted vertices on my mesh. $\endgroup$ Aug 7, 2016 at 18:52
  • 1
    $\begingroup$ I cannot see any vital Information in that. How about starting with the obvious things? Like which exporter do you use exactly? How does your model look like? Please take a look at blender.stackexchange.com/help/how-to-ask - especially the part where it says "Be specific". $\endgroup$ Aug 7, 2016 at 19:02

1 Answer 1

2
$\begingroup$

Assuming either :

  • all groups in the object correspond to the armature (no additional groups) and there is no need to check if bones are deforming bones
  • or there is no armature consideration in the context

you can use this script :

import bpy

def selectUnweightedVerts( obj ):

    for vertex in obj.data.vertices: #go through the vertices
        vertex.select = False #by default deselect
        zeroWeight = 0
        for group in vertex.groups: #count the amount of 0 weight
            if group.weight == 0:
                zeroWeight += 1

        if zeroWeight == len(vertex.groups) : #select if all unweighted
            vertex.select = True

bpy.ops.object.mode_set(mode = 'OBJECT') #for an unknown reason, selecting in edit mode does not work

obj = bpy.context.active_object

selectUnweightedVerts( obj )
$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .