tl;dr: I just want to create some curve guides along those middle points of vertex groups but with a script.
I am new to Python in Blender and I can't seem to find how to do this.
So far, I managed to get X, Y and Z coordinates of each vertex, stored in arrays in a variable named like each vertex group. My goal would be to find the middle point, something like a bounding box for each vertex group.
I did find topics about matrix for bpy.types.MeshVertex but what I have is lists of vertices which do not seem to work with those examples.
Edit2:**Thanks for two different answers on how to do it, have a sub-question, if there is a way to create effectors like path, that **start from those points *(Have their starting point there), and I guess prefferably to get them to go outward away from these vertex group locations.
ob=bpy.context.object
GL = {g.index: g.name for g in ob.vertex_groups}
verts = {name: [] for name in GL.values()}
vertsloc = {name: [] for name in GL.values()}
verts2 = {name: [] for name in GL.values()}
for v in ob.data.vertices:
for g in v.groups:
verts2[GL[g.group]].append(v)
verts[GL[g.group]].append(v.index)
vertsloc[GL[g.group]].append(v.co)