Export active viewport to picture

 From:  Michael Gibson
6111.4 In reply to 6111.2 
Hi Max,

> Michael,
> is it possible to get something like this?:
> moi.ui.mainWindow.viewpanel.getViewport('3D').render(1024, 1024).save("3d.png");

I've added this in for the next v3 beta, so your line of script above will work in starting with the next beta release.

That will be a .render( width, height ) script method that will be available on a viewport, it works the same as renderToClipboard() except it returns back an image object rather than only placing data on the clipboard. Then on that image object there are .save() and .getSaveFileName() (to pop up a file dialog to get a file name) that can be used.

- Michael