cube
bpy.ops.object.mesh_add(type=‘CUBE’)
for ob in bpy.data.objects:
if ob.name == “Cube”:
print all of MyObject’s vertex coordinates
for vert in ob.data.verts:
print(vert.co)
if ob.selected:
ob.name=“newcube”
print
print ( “End of vert list”)
i tried this little script to change the name of selected cube
it works with no errors but does not change the name of the selected object (cube)
your second if was align with the first one
and works fine !
what’s the difference here ?
Thanks