Problems with selecting indices in Blender

不打扰是莪最后的温柔 提交于 2019-12-25 06:32:52

问题


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?

来源:https://stackoverflow.com/questions/36675024/problems-with-selecting-indices-in-blender

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!