# Python: Duplicating a mesh and armature does not update armature modifier

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]

• Are you duplicating through code? Could help to see what you have selected when the code is run. Manually, if you have only one selected at a time, it will default to copying over the modifier as is- pointing to 'Armature'. If both are selected at once, it seems to repoint the object's armature modifier to the newly created 'Armature.001' – Shiprex Aug 8 '16 at 22:35