Screenshot script
All  1-5  6-13

Previous
Next
 From:  Michael Gibson
5523.6 In reply to 5523.3 
Hi DesuDeus,

> Is it possible to capture exactly the same ratio than what you see in the viewport ? This script
> is based on a fixed X and Y pixel dimension and depending on how you resize your MoI app
> it's not perfect
>
> Like if my viewport is 1200px by 600px I'd like to capture that size but two time the resolution
> (2400px by 1200px) or three time the resolution

Currently there's no way to do this because there isn't any method set up for a script to obtain the pixel width and height of the viewport.

But I've added viewport.pixelWidth and viewport.pixelheight properties in for the next v3 beta to make that possible then.

- 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:  Michael Gibson
5523.7 In reply to 5523.4 
Hi shayne,

> Sorry Michael for not being clear
> yes I was meaning the drawing name at the top right say ring.3dm
> Is it possible to automaticaly save a screenshot as ring.jpg

Yup, here's a script that will do that:

script:var img = moi.view.screenshot( 'viewpanel', false ); var filename = moi.geometryDatabase.currentFileName; if ( filename != '' ) { img.save( filename.substring(0,filename.length-3) + 'jpg' ); }

Note that it will just overwrite any existing .jpg of that same name, and it will put it in the same folder as the 3DM file.


> On my V3 wishlist
> Is it possible for MOI to save a thumbnail of the drawing on save so when opening,
> thumbnails show in the current folder rather than just the filenames

It's been on the wishlist for a while, but unfortunately just saving the thumbnail itself is only one piece of the puzzle, I also have to write a couple of different "shell extension" in order to make it possible for the operating system to access the thumbnail as well, by default just storing a thumbnail somewhere inside of a file does not automatically make it visible all on its own.

There's enough fiddling around with doing those that it's been hard to prioritize that work so far.

- 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:  Samuel Zeller
5523.8 In reply to 5523.6 
That would be awesome ! It would be so useful :)
--
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

Previous
Next
 From:  shayno
5523.9 In reply to 5523.7 
Yes we understand you are pretty busy , just a wish
thanks for the above script, at least now when I browse my working folder I can visually see what designs are in there
and open directly from there

Just used it , absolutely fantastic

As an alternative option can this script be run automatically on closing or saving a drawing to create the jpeg

The latest Beta works brilliantly, I think the filleting seems to work a lot better and it seems faster

Many thanks
shayne
  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
5523.10 In reply to 5523.9 
Hi shayne,

> As an alternative option can this script be run automatically on closing
> or saving a drawing to create the jpeg

There isn't really any way currently set up to run scripts at those times, but I guess you could modify the Save.js command script file inside the \commands sub-folder, and paste in that script at the end after the call to moi.geometryDatabase.save().

But that method of saving using the Save command itself will only happen when you do a Ctrl+S or actually click the Save button, not if you close down MoI and save changes at exit time instead.

- 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:  shayno
5523.11 In reply to 5523.10 
Now thats brilliant
That saves so many steps tacking it onto the save command
thanks 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:  coi (MARCO)
5523.12 
Hi Michael!

Would it be possible to utilize rhinos thumbnailviewer

http://wiki.mcneel.com/labs/rhinothumbnailviewer

to display MOI thumbnails?

~ 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
 From:  Michael Gibson
5523.13 In reply to 5523.12 
Hi Marco,

> Would it be possible to utilize rhinos thumbnailviewer
>
> http://wiki.mcneel.com/labs/rhinothumbnailviewer
>
> to display MOI thumbnails?

I don't think that it would be possible for me to bundle that with the MoI install directly, so I think I'd still need to develop my own separate version as well.

- 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
 

Reply to All Reply to All

 

 
 
Show messages: All  1-5  6-13