New Zooming Script

 From:  Michael Gibson
3001.2 In reply to 3001.1 
Hi Burr,

> Do these have parameters that can control the "step" of the
> zoom. Like the "View Button Sensitivity".

There is a parameter if you want to take a "small step" with them, which can also be done with the regular mouse wheel by holding down Ctrl when spinning it.

To get that same effect in the shortcut as the Ctrl+wheel small step, pass an additional parameter to the script function, like this:

For zoom in:
script: /* Zoom in a small step */ var vp = moi.ui.getActiveViewport(); if ( vp != null ) vp.wheelZoom( true, true );

For zoom out
script: /* Zoom out a small step */ var vp = moi.ui.getActiveViewport(); if ( vp != null ) vp.wheelZoom( false, true );


But instead of setting up special keys for this you may be better off just holding down Ctrl while using the wheel.

This new method is more for people who are using something like a pen stylus and don't have a wheel, so that they can get the same function as the wheel by using some keyboard buttons for step in/step out.


> but then have the "ultra sensitive" on the shortcut.

Really the best way for an very small zoom adjustment is to use the zoom button in the Zoom button in the bottom viewport toolbar. To use that button you hold down and drag on it up and down and if you move the mouse only by a small amount it will only go in small steps. It's slightly different than other zoom methods in that it is kind of "animated" - it keeps zooming while your mouse is held down. Just don't move your mouse very far and it does what you are talking about I think, like this:



So notice there that I only move the mouse up and down by a very slight amount.

- Michael
Attachments: