# With python align text to camera

I want to add a text to an object, soft of like a label. The thing is, when I do it with python, view_align=True doesn't work. The text keeps it's original orientation.

I'm not writing a plugin or anything, I have the script in a text file in blender and just run it.

I'm thinking that the view isn't active when I run the script and because of that the text doesn't know what view to orient towards.

Maybe I could find the rotation of the camera and use that to set the rotation of the text object.

• consider using a track to constraint on the text to the camera. May 12 '19 at 8:18

cam_rot = scene.camera.rotation_euler