I am duplicating two objects, an armature and a mesh. The mesh is the child of the armature and has an armature modifier. When the objects are duplicated, the mesh's armature modifier still has "Armature" set instead of Armature.001. How can I fix this?
I set the aramture object using
o.modifiers["Armature"].object = bpy.data.objects[aName]