I am using a python script to create and import some objects.
After creating an object I set it's name like so:
bpy.context.object.data.name = "MyObject"
and the new object is now named "MyObject"
However if I run the script again, the new object is now "MyObject.001" and the old object remains as "MyObject".
Even though I explicitly told python to name it to "MyObject" (and the rest of the script relies on that name) - but it's changing it anyways.
My scrip is unaware of the fact that Blender is forcing the name to change.
How do I force Blender to change the name of the object to exactly what I set it to. I don't care if it indexes the old objects.
Just seems like bad default behavior in the first place.