Problems with selecting indices in Blender

2019-09-13 18:40发布

I have an object (imported from a 3DS) in blender and I am manually segmenting it into parts using (box or circle) select in edit mode.
Now, I need to take these parts and combine them in a different software. The way to do this is through indices, I select the vertices of a part and run the following script (in edit mode):

import csv
import bpy

o = bpy.context.active_object.data
selected_verts = [vert for vert in o.vertices if vert.select]
vertIndexes = [id.index for id in selected_verts]

with open("<path to file>/parti.csv", "w", newline='') as f:
    writer = csv.writer(f)
    writer.writerow(vertIndexes)

The problem is that the other software I use uses the 3DS file and it messes up all the indices over there. What can I do to get the part by part indices?

Basically, what I need is this.
If I were to select a bunch of vertices in Blender and delete the rest, what is the mapping from the current index numbers to the old index numbers?

0条回答
登录 后发表回答