Please lift Camera Shift X-Y hard limits

A camera’s Shift X and Y have a hard limit of 10 (positive or negative).
In my situation I need to go way beyond that.
More specifically, I need to render regions of a frame by converting the Ctrl+B region to the camera itself by using shift X and Y. I made this add-on that does all the calculations to convert the Ctrl+B region but it hits a wall if I make a small region towards the borders of the frame.

Steps to reproduce:

  • Install my Camera Regions add-on
  • From a new scene, enter the camera
  • Do Ctrl+B and draw a small rectangle roughly in the middle of the frame
  • To keep track of the region, add a mesh plane that fits exactly inside of it
  • In the Camera’s properties (the green camera icon), go to the Regions panel, click Add Region and hit Enter: the plane you created should fit exactly in the camera’s frame now.
  • Ctrl+Z to cancel adding the region and do it again, this time with a tiny region on a corner of the frame. Again keep track of it by adding a plane. If the region is small enough, then the plane you created doesn’t fit in the frame anymore. That’s because the Shift X and Y have clamped to 10 when it should’ve gone beyond.

I don’t know why this hard limit was set but I hope it can be lifted so users gain more control and people can use Camera Regions without running into this problem (which someone I’m in conversation with actually is right now).


A visual example of that issue:

Center region created properly. Top left failed and the new camera is shifted.

The addon can’t shift new camera past this value. It’s also not possible to enter, let’s say, “-11” value manually in this field:

One way to approach this:

  • Compile Blender
  • Go to source\blender\makesrna\intern\rna_camera.c
  • Edit Lines 698 and 705 ('RNA_def_property_range")
  • Compile and Test
  • Submit a patch

Been able to successfully change internal range from -10/10 to -1000/1000 and compiled Blender 3.4, thanks to Harleya. All it took is adding a couple of "0"s and about an hour of 100% cpu load. Not counting the environment setup issues here.

Now I need to figure out how to turn it into a proper patch.


The patch is here for review - ⚙ D15650 Camera XY shift range expanded from -10/10 to -1000/1000


That first compile does take a long time, but you probably noticed that subsequent compilations are much faster. There are also build options that can make it quicker. For example a “lite” build will do so with minimum features and dependencies and can be done in seconds, depending on what you have changed.

1 Like

I used “make release” cause the default option wasn’t working and telling that I don’t have a Python installation on my machine. Yet, the Optix wasn’t available in my build, so I switched back to 3.3 beta and will wait till that patch is automatically added to the master branch in any Blender version. As soon as it’s there, I’ll start using that updated version.