How can I rotate a plane to make it have the same orientation of another plane. Until now I have:
import bpy
# The object to rotate
ob = bpy.context.active_object
# The object world normal vector
ob_local_normal = ob.data.polygons[0].normal
ob_world_normal = ob.matrix_world * ob_local_normal
print(ob_world_normal)
# The plane to be aligned/parallel with
pl = bpy.data.objects['Plane']
# The plane world normal vector
pl_local_normal = pl.data.polygons[0].normal
pl_world_normal = ob.matrix_world * pl_local_normal
print(pl_world_normal)
# Now I need to rotate the object...
In Python rotate a polygon to face something was also helpful but I need the 2 planes beeing parallel each other.