New Zooming Script All  1  2-9

Previous
Next
 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:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3001.3 In reply to 3001.1 
Hi Burr,

> Side Note: If those like me have there Trailing zeros set
> to a higher value, The little view zoom rotate dialogue
> display labels are not expanding properly and truncating
> the numbers.

Oops it looks like I forgot to set those to have only 2 decimal places instead of using the full setting that is used for model distances.

These ones are only 0 to 1 scale factor parameters for view adjustments, so they can get by with a smaller display.

I've fixed this up for the next release and if you want to update your current one, copy the attached RotatePanZoomOptions.htm file over top of the old version in the \ui subfolder and then it should work better.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3001.4 In reply to 3001.2 
Hi Michael,
Yes I didnt know that the ctrl key incremented the steps like that. It's nice. But, I am more refering to the "View Button Sensitivity" setting in the options and the way it works. Like the way the zoom widget in the viewport "Is" much smoother than the wheel, I am looking for the ability to jump in and out of the View button sensitivity setting at say ".1"

I use Moi to examine geometry and having that setting be set to .1 is something I use (Or even a few variations of this number).

So the ability to set this on the fly without going to options dialogue.

This would "Kindof" work with the wheel zooming "steps" (Kindof like I have Nudge-Nudge Large, I also setup Nudge .01..... ) but as you point out, the Zooming widget is much nicer with its "Gorgeous Zooms" (Borrowed from your website) so the request has turned from the zoom step, to a shortcut for setting the sensitivity of the Viewport Zoom widget.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3001.5 In reply to 3001.4 
Hi Burr, so you mean a keyboard shortcut that sets this this option here:



That's possible to do with the following script set up on a shortcut key:

script: /* Set view button sensitivity */ moi.view.zoomButtonSensitivity = 0.1;


But part of the action of that zoom button takes into account how far you have moved the mouse from the initial click down point. If you only move it by a few pixels you should get a very small stepping zoom in effect already (like in the video above) without needing to hit any keys.

But if you want to set different sensitivities with different keys, use the shortcut above and you can change that 0.1 value at the end of the script to different numbers for different keystrokes.

- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3001.6 In reply to 3001.5 
Thats it Michael.

Thanks. When I get in really close I feel better with the sensitivity drop so this will help me.
Burr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
3001.7 In reply to 3001.5 
>>>>That's possible to do with the following script set up on a shortcut key:
>>>script: /* Set view button sensitivity */ moi.view.zoomButtonSensitivity = 0.1;>>>>
>>>


Hi Michael,

Could I see one example added to this script that would toggle the sensativity back to a default value, say of 1, if it was already at .1

Thanks for the time on this,

Burr
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3001.8 In reply to 3001.7 
Hi Burr, no problem.

> Could I see one example added to this script that
> would toggle the sensativity back to a default value,
> say of 1, if it was already at .1

If you want to have a shortcut that just sets it directly to 1 on a certain keypress, use:

script: /* Set view button sensitivity */ moi.view.zoomButtonSensitivity = 1.0;


If you want just one single shortcut that flips back and forth between 0.1 and 1.0 every time you press it, that is also possible, here is that one:

script: /* Toggle view button sensitivity */ if ( moi.view.zoomButtonSensitivity != 1.0 ) { moi.view.zoomButtonSensitivity = 1.0; } else { moi.view.zoomButtonSensitivity = 0.1; }


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  BurrMan
3001.9 In reply to 3001.8 
Hi Michael,
Yes the second was what I was after.

I'll study the different parameters, ie;

() and {} added that allow me to do the If/Else myself without bugging you for something so simple. :O

Thanks again!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1  2-9