Zoom option with absolute adherence to delta value in keymap

When you zoom in close to your focal point, the amount zoomed in/out adjusts and is very small. This is useful but not good for when I want to zoom back out again. It takes several revolutions of the mouse wheel to get back where I want to be.

I added a new zoom in the keymap for shift-wheelDown and changed the delta to, in vain, get a way to quickly back out of a closeup. It doesn’t matter if I use -1 or -9999 it still uses a “smart” zoom that goes in agonizingly small increments.

My only option is to use the continuous zoom which is a bit sensitive for me, not ideal.

What would work really well is to disable the adjustable zoom in the keymap on a per-mapping basis. For me, I would leave normal mousewheel like normal, to slow down when in close, but also have a shift-mousewheel that will adhere to whatever delta value I assign in the keymap.

Thought I had an easy fix by using view3d.dolly and changing the deltas to +/-2000. It gives the behaviour I wanted for when you are so close to your focal point that the zoom increments go way down. The problem with this is that with dolly, you are moving the camera instead of adjusting the zoom. So focal point moves outward along with your view, and pivot/orbit goes with it.

So, semi-quick fix for this is to just duplicate the view3d.zoom and plug everything in to dolly. Tried to make a new zoom mode called view3d.zoomfast, same way I made a new repeat tool & history mode, rather than replacing repeat last & history, but it kept acting like something was missing.

Don’t care for dolly anyway, and don’t see myself ever needing that particular camera functionality, so we are good to go.

Basically, copy everything from the normal zoom section of view3d_edit.c (lines1755-2280). Don’t just slam all of it into the dolly section, you’re going to have to rename a lot of things from viewzoom to viewdolly, etc. Leave the OT and modal sections alone. Remove the stuff in dolly that doesn’t exist in the zoom area, and add the missing zoom area stuff.

Finally, the part that actually does something we want, zoom in/out faster. Go find the viewdolly_exec area, if you’ve been following along, it no longer has its original content in there, but the viewzoom_exec is there instead. Change the step floats, they are inversions of each other. One for zoom in and the other for zoom out. If you don’t want the in and out to be the same, you can play around with it.

I’m going with triple speed in/out. 3.0f and 1.0f/3.0f respectively.

If you didn’t mess it up too bad, you will be able to build, and everything will be functional.

I have normal zoom mapped to mousewheel up/down, and dolly zoom (fast zoom) mapped to shift-mousewheel up/down.