I have rigged a character and auto weighted the mesh to armatures. A set of vertex groups are generated from this way automatically.

However, I tried to get vertex_groups but failed.


returns 0

How can I get access to the vertex group generated?

  • $\begingroup$ Please answer only one question per Stack Exchange question. I've answered your first: how to access the vertex groups in Python. Creating a convex hull out of a vertex group and using that for collision detection is something else. $\endgroup$
    – dr. Sybren
    Sep 27 '17 at 10:37
  • 1
    $\begingroup$ Thank you. I will post convex hull question separately if I can't figure it out. $\endgroup$ Sep 27 '17 at 14:48

The vertex groups are on the mesh object, not on the armature. The armature itself doesn't have any vertices.

>>> list(vg.name for vg in D.objects["Cube"].vertex_groups)
['Bone', 'Bone.001']

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.