my goal is to be able to detect when a child object is renamed in a way to display actual name and associated length value in every moment. I first have a list of all name of object children. If an object is renamed, I want to replace the ancient name in my list by the new one. However, it is not working when I rename several children.. Maybe there are others way to do it, or something I don't see in my code ? Thank you.
for child in obj.children : if child.name not in bpy.types.Object.allnameList : # A rename happened : Find the name to replace : for w in range(len(bpy.types.Object.allnameList)): if bpy.types.Object.allnameList[w] != child.name and (bpy.types.Object.allnameList[w] not in obj.children) : bpy.types.Object.allnameList[w] = child.name