Export active viewport to picture
All  1-2  3-6

Previous
Next
 From:  coi (MARCO)
6111.3 In reply to 6111.2 
hi there!

you could use these scripts:

CaptureViewToClipboard

this renders a larger image of the active viewport and copy it to the clipboard; you can possibly adjust the resolution and the line width
code:
script:var v = moi.ui.getActiveViewport(); if ( v != null ) { moi.view.lineWidth = 4; v.renderToClipboard( 2560, 2560 ); moi.view.lineWidth = 1; }


you can set a whole lot of options there, like line width, resolution or lighting style..

http://moi3d.com/forum/index.php?webtag=MOI&msg=1049.31


CaptureScreenToFile

you can use this script to save a screenshot out to an image file by using a shortcut key, without needing to run any other program.
code:
script:var img = moi.view.screenshot( 'viewpanel', false ); var name = img.getSaveFileName(); if ( name != '' ) img.save( name );


~marco
  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
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
  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:  Max Smirnov (SMIRNOV)
6111.5 In reply to 6111.4 
>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.

Great! Thank you!

script: new ActiveXObject("Sapi.SpVoice").Speak("Thank you 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:  Samuel Zeller
6111.6 In reply to 6111.4 
Awesome ! :)
--
shapenoid.com stojan-voumard.com
  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  3-6