How can I create an empty / null / locator object using python? I'd like to create one for each selected object and then all empties should be parented or constraint to the selected objects, meaning that the rotation and position should be copied over as well.
I tried something along these lines but I can't get it to work properly:
import bpy
for obj in bpy.context.selected_objects:
bpy.ops.object.empty_add()
Q: How to create an empty per object in selection?