ID face index or edges vertex

when you are in blender and select a face or edge or vertex

is there a place where you can see the ID of that element

i mean when select a face i’d like to know what the index number is for this Face
so that i can go back in a script and be able to identify which index it is ?

Thanks

I had the same problem and made that script I run from the Tex Editor

import Blender

#we search for:
x = -0.033
y = -0.022
z = -0.462

ob = Blender.Object.GetSelected()[0]
mesh = ob.getData(mesh=1)
for i in range(len(mesh.verts)):
v = mesh.verts[i]
if (round(v.co.x,3) == x) and (round(v.co.y,3) == y) and (round(v.co.z,3) == z):
print i

good way to find a specfific one

i did a script to print the vertex and edges
but the thing is taht you have to select the vertex in blender with n transform panel
then read the resustl from the script

so that’s takes a long time to do

is it there a bettere way to deal with this and identify easily the ID of vertex?

Thanks

I made a better one:


import Blender 
from Blender import Window 
 
sce = Blender.Scene.GetCurrent() 
objects = sce.objects 
 
print "---
" 
for ob in objects: 
    edit = False 
    if Window.EditMode(): 
        Window.EditMode(0) 
        edit = True 
    if ob.getType() == 'Mesh': 
        mesh = ob.getData(mesh=1) 
        for i in range(len(mesh.verts)): 
            v = mesh.verts[i] 
            if v.sel == 1: 
                print "vert: "+str(i) 
    if edit: 
        Window.EditMode(1)         
                 

If we don’t go to object mode, it doesn’t work, that’s why the scripts leaves the edit mode and returns to it.

To see numbers of ALL verts in Edit mode, I use this script here

Regards,