Convert render region and viewport to resolution and camera positon?

Often as I’m just playing around in blender I’ll find I enjoy the current viewport camera position and the render region I have set currently. I know how to make a camera and have the camera match my viewport position (it’s never correct but usually close enough). I would like to make the scene render resolution match the render region box but I can’t find anywhere that says what width and height the render region is.

I guess what I’m really asking is: What are all the steps necessary to turn what I see in the render region of my viewport into exactly the same thing in a real camera so I can get a proper test render?

I think this may help you

There are some camera settings linked in the document that looks like they are what you are asking for.

A few things:

  • Ctrl+Alt+0 makes the Scene’s active camera jump to your current viewport view.
  • The render region has sliders but they’re not in an obvious place. You’ll find them in the Outliner, Data API mode, Scenes > Your Scene > Render Data > Region Minimum X/Y, Maximum X/Y:

These sliders are a multiple of the Render output resolution (from 0 to 1)

  • If you want to literally convert your region into the camera itself (with the corresponding output resolution), you can use my addon: Camera Regions. Ask over in this other thread if you have questions.
1 Like

As i saw a simular request on BLender Today #201, i thought i let me look for some code. Than found the addon mentioned above and added the code to this one. Its work as asked, still needs to be merged, but works without errors