1
$\begingroup$

I am trying to build a python script that places a image as plane object (add-on) programmatically in function of the resolution of the camera.

There are two cases :

1- The image ratio and the camera ratio are the same so i want to place the image as plane so that when i render the scene the image takes full space of the frame.

2- The image ratio of the image is different so i want to place the image as plane so that the camera points to the center of the image and takes a part of the image so that the rendering takes full space of the frame.

If you have any idea of how to do it, i ll be great help.

Thanks.

$\endgroup$
  • $\begingroup$ you might want to look at the script on blenderartists.org/forum/… $\endgroup$ – cegaton Mar 29 '16 at 17:51
  • $\begingroup$ Thanks for the link, i tried the addon, it is almost what i am looking. Nevertheless it does not use image as plane addon so i get a plane that is not with the image aspect ratio. I will study the script to understand how the distance is calculated. $\endgroup$ – johnconnor Mar 29 '16 at 23:22
  • $\begingroup$ Note that the plane created with this add-on can be edited in edit mode, so changing the aspect ratio is quite easy. $\endgroup$ – cegaton Mar 30 '16 at 1:04

Your Answer

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

Browse other questions tagged or ask your own question.