Merging bones - fix weights?

When merging bones, is there a way to merge vertex weights? E.g., I merge bone 1 and bone 2 to bone 3, now I just want all the vertices that used to belong to bone 1 and bone 2 to now belong to bone 3, without having to manually weight paint them.

You might be able todo this with a python script.
Can you provide a picture of what you are trying to achive?

You can rename vertex groups to the name of the bone you want them to be weighted to.

After merging, put the armature back in Pose Mode. Then click on the mesh and go to its vertex group panel. Delete the vertex group for the bone that no longer exists. Put the mesh in Weight Paint Mode and select the newly merged bone in the armature. Hit W>Assign Automatic From Bones. This is just like parenting with Automatic Weights, but only for the currently selected bone(s). It will re-create the weights for that selected bone without disturbing the whole rest of the mesh’s weights.