I am try to do something based on the ID of a vertices. I want blender to show me the vertices ID. How can I have blender show me the ID in the viewport? I do not see an option in the Mesh Display tab.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
There's a built-in feature to show mesh element indices, but the option is only shown in debug mode.
bpy.app.debug = True
There's also an updated version of the Index Visulizer script:
I made a usability modification to the script offered by @CoDEmanX, a while back, because it can be a pain to get the theme colours to play nice enough to let me read the indices. Hence I added a polygon background.
script available from: https://gist.github.com/zeffii/9451340
bpy.app.debug = True would also include some background for the numbers, as is the case with Ruler/Protractor feature.
On printing one vertex the index comes as a property. So you can utilize that to refer a vertex as well. You can record their indexes while making the vertices.
m=bmesh.from_edit_mesh(bpy.context.object.data) vertices= #include vertices here m.verts.new(vertices) indexes= indexes.append( (int)((str)(m.verts[i])[( (str)(m.verts[i]).find('index=') )+2:-1]) for i in range(len(vertices)))
Hope that solves the problem!