Hi Mike, it is possible to get and set the camera x,y,z position by script.
Here's a script that will copy the camera and target points as text to the clipboard, you can then paste that into a text editor:
script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); moi.copyTextToClipboard( 'Camera=' + v.cameraPt.toString() + '\r\nTarget=' + v.targetPt.toString() );
Here's one that will set the camera point to a specific value:
script:var v = moi.ui.mainWindow.viewpanel.getViewport('3D'); v.cameraPt = moi.vectorMath.createPoint(50.2, 30.5, 10.1);
Also check out this previous thread for some related view saving/restoring stuff:
http://moi3d.com/forum/index.php?webtag=MOI&msg=2891.7
- Michael
|