Reset view command or script

 From:  Michael Gibson
11336.2 In reply to 11336.1 
Hi Matadem,

re:
> Is there a command to reset your view (like hitting the reset button?)

Reset the active view (same as pushing "Reset" button on viewport bottom toolbar):

script: moi.ui.getActiveViewport().reset();

Reset all views (same as right-clicking "Reset" button on viewport bottom toolbar or using View > "Reset all" button on side pane):

script: moi.view.resetAll();


> and can it be done that it does not zoom at a 100%?

You could add a call to viewport.zoom( 1.1 ) if you wanted it to zoom out a little after the reset.

Like this:
script: v = moi.ui.getActiveViewport(); v.reset(); v.zoom( 1.1 );


- Michael