Copy Custom Property and set it as a suffix of an object's name How to copy selected object's property and set it as a suffix of an object's name?
I have 3 objects in the scene, named a,b,c. Each one of them have a custom property named id with a corresponding value 10, 20, 30. What I want to achieve is to have that custom property pasted into their names as a suffix. Basically something like this:
a?id=10
b?id=20
c?id=30


Could you please suggest the simplest way? I was thinking about having some sort of a python script, that would allow me to do this for all of the selected objects in the scene.
Try this
import bpy
for ob in [*bpy.data.objects]:
    if not ob.select_get(): continue
    if &quot;id&quot; not in ob: continue
    suf = &quot;?id=%s&quot; % ob[&quot;id&quot;]
    ob.name += suf