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.

  • 2
    $\begingroup$ consider using a track to constraint on the text to the camera. $\endgroup$
    – batFINGER
    May 12, 2019 at 8:18

1 Answer 1


I got the idea while writing my question. I'm not very good at 3D math with matrices etc but it worked.

Maybe someone will be helped by this.

cam_rot = scene.camera.rotation_euler
textobject.rotation_euler = cam_rot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.