I have been thinking about this for a long time. I decided that I would try finding a workaround or jump on the python train. But unfortunately I still don't have solution and I am at my wit's end. Here's what I could gather:-
Setting border render coordinates using python:-
bpy.ops.view3d.render_border(xmin=188, xmax=423, ymin=271, ymax=489)
Setting Render/Camera resolution using python:-
for scene in bpy.data.scenes:
scene.render.resolution_x = 1920
scene.render.resolution_y = 1080
My main objective is to match the camera/render resolution to the Border render coordinates so that the camera fits to the drawn render border. I want to do this mainly because it's easier and saves a lot of time than manually adjusting the resolution and the location of the camera.
Question
How do fit the camera/resolution size to the render border through python ?