objets in local mode and names ?

is there a script that cam help identify objects with their name in viewport ?

like supposed you select a small group of objects and you need to list their names but also show it in the viewport

thanks

Like

for ob in bpy.data.objects:
    ob.show_name = True

?


for ob in bpy.data.objects:
     if ob.select == True:
          ob.show_name = True

but can this work when you go into local mode like
keypad /
which hides most of the object except the selected one?

and is there a way to do that even if the objects in local mode are not selected ?

sometimes you may have objects inside other objects parented or not
and it’s difficult to see in viewport how many objects you really have !

and it might be objects like meshes curves or anything else as objects!

thanks

it shows names no matter if they are selected or not. In local mode (keypad /), it shows name of the current object only (other objects as well as their names aren’t visible)

don’t know does nto seems to work nicely
sometimes it will print the right objects name in local mode other it wont
try this

it does work well for the name in viewport !
but strangely not in the console

so hidden iequivalent to H key or local mode ?
and if hidden then it wont be in the list

localmodeobject1.blend (563 KB)

thanks

what do you mean, not in console?

seems to work as it should…

ok may be my fault
i added a print line for the name to show in console
but i was also doing Z undo and it was erasing the print line may be!

seems to work fine now !

thanks