vertex group in blender 2.49


Is there any way to get the vertices from a given vertex group from the active object? For example my active object is the “Face” and to get the vertices of the “upper-lip” vertex group?

I’m looking all over and so far only found solutions in blender 2.5

time to make the jump then :slight_smile:

You can use Blender.Object.GetData("…") which contains all of the information (vertices, faces, etc) for the given mesh, then use a simple loop to test each vertex and select them sequentially or put into a new array

sc3sc3: my code is over 900 lines, so I would rather not change if it is not necessary…, but thanks for the tip :wink:

numby: thanks, I’ll try that!

I figured it out. it saves all the vertex groupes vertices to a file

out = open(“file.txt”,“w”)
mesh = Object.GetSelected()[0].getData()
for grp in mesh.getVertGroupNames ():
for vidx in mesh.getVertsFromGroup(grp):