Page MenuHome

Zoom To Border operator - zoom factor is too high in the perspective view.
Closed, ResolvedPublicTO DO

Description

System Information
Operating system: Windows-7-6.1.7601-SP1 64 Bits
Graphics card: GeForce GTX 770/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.75

Blender Version
Broken: version: 2.83.5, branch: master, commit date: 2020-08-19 06:07, hash: rBc2b144df395f
Worked: (probably never)

Short description of error
Hello.
I wanted to point out the incorrect behavior of the "view3d.zoom_border" operator in the perspective view.
As you can see in the gif below in Perspective view, zoom factor is too high in relation to the drawn frame.
This behavior is especially inconvenient when working in navigation mode with the "Auto Perspective" option turned on.
Thank you
Gif:

Event Timeline

Nanomanpro updated the task description. (Show Details)
Campbell Barton (campbellbarton) changed the subtype of this task from "Report" to "To Do".Sep 16 2020, 7:00 AM
Campbell Barton (campbellbarton) added projects: EEVEE & Viewport, Restricted Project.
Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Sep 16 2020, 11:58 PM

I'm not able to reproduce this. Can you give some more info on how to reproduce it? Or can you check if it's fixed in the latest Blender version?

Ah, I get what part of the problem is now. It's not taking the viewport focal length into account. The problem gets worse as you increase the focal length of the viewport.
Another problem is that the height of the selection box is not very important in the calculations either which means any box with a lower x/y ratio than the view will get cut more.
I made a patch that kind if works a bit better but I will continue investigating.