Reset view?

Next
 From:  3image
8025.1 
Hi there,

How can I reset the view of all viewports at once like as when you start up MoI without any scene objects?
  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
8025.2 In reply to 8025.1 
Hi 3image, you can use File > New to reset everything in MoI to the same as the initial startup state, that will wipe out any current objects though. You can follow that with a File > Import to bring in the contents of a file you have just saved without changing the views though - Import will not modify your current views unlike Open.

You can also reset all viewports to zoom to fit objects by doing a right-click on the Reset button on the toolbar on the bottom of any viewport. That's not the same as resetting to the start up views though.

So to reset to start up views while keeping your current objects, either save your current objects to a 3DM file or use Ctrl+C to copy them, then use File > New to do the full reset, then use File > Import or Ctrl+V paste to bring back your objects without shifting the view.

- 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:  3image
8025.3 In reply to 8025.2 
Thanks Michael, but I think copying the objects from one document to another is quite a tedious task just to "reset" the view to the initial state. Is there no way to do this via a script or so?
  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
8025.4 In reply to 8025.3 
Hi 3image, if you only need to do it occasionally the method described above is not excessively tedious.

If you need to do it more frequently for some reason, it is possible to make a script that will do it, try pasting in the following into a shortcut key:

script: /* Reset views to initial default */ var vp = moi.ui.mainWindow.viewpanel; var vtop = vp.getViewport('top'); var vfront = vp.getViewport('front'); var vright = vp.getViewport('right'); var v3d = vp.getViewport('3d'); var vm = moi.vectorMath; var origin = vm.createPoint(0,0,0); vtop.targetPt = vfront.targetPt = vright.targetPt = origin; vtop.fieldOfViewAngle = vfront.fieldOfViewAngle = vright.fieldOfViewAngle = 30.0; v3d.setCameraAndTarget( vm.createPoint(25,-50,25), origin ); v3d.fieldOfViewAngle = 0.48 * 180 / Math.PI;

- 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:  chippwalters
8025.5 
Here are a couple nifty keyboard shortcuts:

I've remapped my shift-A to
code:
/*!RESET VIEW*/script:moi.view.resetAll();


This will reset views if nothing is selected OR ZOOM all views to the selected objects. One of the nice things about resetting to the selection is it also resets the camera "looking at" point to the center of the selection, making editing easier as all right-button rotates are not pivoting about the selection.

Another two I like a lot is:

code:
/*!ZOOM OUT*/var z=1.2, vp=['3D','Left','Right','Top','Bottom','Front','Back']; for (var n in vp) moi.ui.mainWindow.viewpanel.getViewport(vp[n]).zoom(z);

and
code:
/*!ZOOM IN*/var z=.8, vp=['3D','Left','Right','Top','Bottom','Front','Back']; for (var n in vp) moi.ui.mainWindow.viewpanel.getViewport(vp[n]).zoom(z);


I map these to the ',' and '.' keys (< and>) and they will zoom all views OUT or IN by a small fraction, so you can tap them a few times in a row to get where you want.

With these keys, and the mouse scrollwheel I rarely need ANY other viewport zoom controls.
  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