I have a blender file with this scene (below) seen from the camera. Now I need to get the 3D points of the mesh (the doughnut) in world space according to the camera perspective, pragmatically. Meaning I need a python script I can run to save a text file with the list of 3D points I need. I also need to know the camera direction vector.
I'm using Blender 2.83 and I have python 3.7 installed. Thanks in advance.