Is there a way to create an arbitrary transform orientation in Python?
The API function
bpy.ops.transform.create_orientation() only allows the orientation to be created from the current view or the selected object. In my particular case, I want it along the line between two objects.
My initial thought is to create the transform orientation (call it 'mytransform') with
bpy.ops.transform.create_orientation(), and then directly set
- I don't know if this is kosher (I try to avoid mucking directly with the data structures when possible).
- It has some disadvantages, mainly that I can't run it from the Python console for testing (
create_orientation()only works in a 3DView context).