Getting separate body parts from a Makehuman object file I have the object file for Makehuman, which is basically an open source human body mesh.
For my project, I need its individual body parts. Now, I can do this by manually selecting the corresponding mesh vertices in blender (which I have managed to do).

An obj file would typically look like:

v -0.3110 7.3315 1.4107
v -0.3481 7.3465 1.4062
v -0.3095 7.3456 1.4117
v -0.3487 7.3574 1.4039
v -0.3080 7.3566 1.4103
....


Now, I want to segregate this obj file so that I can get the vertices and edges corresponding to the selections. How can I do so?
PS: I also need to preserve the global indices in the segregated mesh files, so simply deleting off the unselected parts and exporting to a new obj file isn't an option.
You can use this script on blender to show vertices for each item in the mesh:

import bpy
for object in bpy.data.objects:

    print(object.name)
    if object.type == 'MESH':
        for vertex in object.data.vertices:
            print(vertex.co) 


if you need to show just one part called part_name: you can do like this

import bpy
for object in bpy.data.objects:
    print(object.name)
    if object.name=='name_part':
       for vertex in object.data.vertices:
           print(vertex.co)