I have this script:
import bpy
track = bpy.context.selected_objects
for i in track:
bpy.context.scene.cursor_location = i.location
bpy.ops.object.empty_add(type='CUBE', radius=0.05)
Track are the trackers and I want to parent the trackes to the emptys that where created.I try this script but it isn 't working:
import bpy
track = bpy.context.selected_objects
em = []
for i in track:
bpy.context.scene.cursor_location = i.location
new = bpy.ops.object.empty_add(type='CUBE', radius=0.15)
em.append(new)
bpy.ops.object.parent_set(em)
I just want to make my life easier.Thanks for any responts.
F.Y.I. : I 'm doing facial motion capture. I track the markers reconstruct them and then I did constraints to F-curves.I want the trakers-empties to align to the bones of the face of the pitchipoly human, before I constaint the bones location to the trackers-empties(copy location). I thought that this solution is simple, but the trackers-empties where too many so I thought to make a script.