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.

I want to see the numbers next to the verts

enter image description here


There's a built-in feature to show mesh element indices, but the option isn't shown in the user interface by default.

Blender 2.7 and older:

The option only shows if the debug mode is enabled.

  1. Start Blender in debug mode, or simply go to Python Console (Shift-F4) and type bpy.app.debug = True
  2. Go to N-panel > Mesh Display
  3. A checkbox Indices will now show
  4. The colors are controlled by the interface theme

There's also an updated version of the Index Visulizer script:

Blender 2.8:

It only shows if the developer UI option is turned on.

  1. Run Blender normally
  2. Click Edit > Preferences...
  3. In the Display panel of the Interface tab, tick Developer Extras
    or type bpy.context.preferences.view.show_developer_ui = True into the Python console.
  4. Open the Overlays popover in the 3D View Overlays popover
  5. Look for the label Developer and tick the checkbox Indices

    Developer Overlay Indices

  • $\begingroup$ CoDEmanX steps work for Blender Version 2.73.a on OS X. !enter image description here $\endgroup$ – user13466 Mar 28 '15 at 23:46
  • $\begingroup$ @CoDEmanX I can't download the visualizer script.... do you know if the address is ok??? thanks $\endgroup$ – yhoyo Mar 29 '15 at 4:28
  • $\begingroup$ It was probably removed from the repository / old tracker, but I updated the link to point to a phabricator file. $\endgroup$ – CodeManX Mar 30 '15 at 8:36
  • $\begingroup$ It seems this has been moved to another place in Blender 2.8. Any ideas where I could find it? $\endgroup$ – Bauxite Apr 9 '20 at 12:26
  • 2
    $\begingroup$ @Bauxite It moved into the Overlays popover and depends on a different option now (Developer Extras, bpy.context.preferences.view.show_developer_ui). I updated my answer. $\endgroup$ – CodeManX Apr 9 '20 at 15:46

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.

enter image description here

script available from: https://gist.github.com/zeffii/9451340

ideally the bpy.app.debug = True would also include some background for the numbers, as is the case with Ruler/Protractor feature.

  • 1
    $\begingroup$ Any plans to port this 2.8? The immediate mode is gone, bgl.Color etc. are no longer supported and don't know how to use the new way, using bind buffers and stuff. Also, coloring the text will probably require support in blf, because without immediate you can't set a color just like that before the blf draw call to affect it. $\endgroup$ – CodeManX May 24 '18 at 12:28

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.

vertices=[] #include vertices here
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!

  • $\begingroup$ The OP wanted to show the index in the viewport. $\endgroup$ – jdk1.0 May 8 '18 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy