Save as screen > jpg

Next
 From:  TOM (SIRTOM)
10713.1 
Hi,

What do I have to change in the script to tell it to save
primarely as jpg instead of png ? Thanks TOM
  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
10713.2 In reply to 10713.1 
Hi Tom, what is the current script you want to modify?

- 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:  Frenchy Pilou (PILOU)
10713.3 
If you click on the little triangle "head down" you have 4 choices! ;)

script:var img = moi.view.screenshot( 'viewpanel', false ); var name = img.getSaveFileName(); if ( name != '' ) img.save( name );


  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:  TOM (SIRTOM)
10713.4 
Hey Pilou thank you very much.

being a workfolw gourmt I want to save two clicks
and save directly as jep instead of opening the menu ...
  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:  TOM (SIRTOM)
10713.5 In reply to 10713.2 
Its the script to save the UI as screenshot which saves
as png as default and I would like to change the
default to jpg
  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
10713.6 In reply to 10713.5 
Hi Tom,

> Its the script to save the UI as screenshot which saves
> as png as default and I would like to change the
> default to jpg

Can you please post the script code?

- 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:  TOM (SIRTOM)
10713.7 In reply to 10713.6 
Can you please post the script code?

Of course, sorry I assumed you had it in your archive.
--------
// config: norepeat

moi.geometryDatabase.saveAs( moi.command.getCommandLineParams() );

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

  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
10713.8 In reply to 10713.7 
Hi Tom,

re:
> Of course, sorry I assumed you had it in your archive.

Well there are quite a few different variants.

The one you posted does not seem to match your first description though, it's doing a "SaveAs" and then in addition to saving the model it's writing out a screenshot image as a .jpg file with the same base name as the .3dm file. I don't see where it is asking you for a PNG filename.

Is that maybe not the right one?

- 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:  TOM (SIRTOM)
10713.9 In reply to 10713.8 
I were not sure about its name so I must have choosen the wrong one ...

I copied the following lines directly out of the option menu where I assigned
it to the keybord "y" so

script:var img = moi.view.screenshot( 'viewpanel', false ); var name = img.getSaveFileName(); if ( name != '' ) img.save( name
  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
10713.10 In reply to 10713.9 
Hi Tom, try putting this in instead, this one should put up a file dialog that only has .jpg in it:

script:var img = moi.view.screenshot( 'viewpanel', false ); var name = moi.filesystem.getSaveFileName( 'Save Image', 'JPG files (*.jpg)|*.jpg' ); if ( name != '' ) img.save( name );

- 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:  Frenchy Pilou (PILOU)
10713.11 In reply to 10713.10 
That win one click against the multiple choice! :)
And less versatile! :)
  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:  TOM (SIRTOM)
10713.12 In reply to 10713.11 
Two clicks ;-) It may sound exagerated to try to save one or two clicks.
But if you do that consistently everywhere it makes working so much more
fun. I enjoy MOI so much because its workflow is so smooth that it is
almost like a direct translation of thought into shape.

Without having to stmble about annoying clicks ;-)
  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:  TOM (SIRTOM)
10713.13 In reply to 10713.10 
I appreciate your help Michael - thank you vry much !!
  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