Skip to main content
Known Participant
October 19, 2009
Question

saveOptions Softimage PIC / OpenEXR

  • October 19, 2009
  • 2 replies
  • 1356 views

Hi,

I would like to add the Softimage PIC and OpenEXR file formats for a jsx script. I was wondering how we can access to the classes/objects for the formats that are not define by default in Photoshop in order to set options in the saveAs function.

Thanks

This topic has been closed for replies.

2 replies

Chris Cox
Legend
October 19, 2009

At the moment, there are no options for either of those formats beyond the filename/path.

You'll need the 4 character descriptor codes for each format (which you could grab from the listener or parsing the resources).

Known Participant
October 20, 2009

Yes, indeed, this plugin is very useful for getting the code of operations we can do in Photoshop that aren't not available in scripting.

Thanks you guys for your help!

Paul Riggott
Inspiring
October 19, 2009

If you can save out in these formats, you will need to install the scriptlistener plugin then use the output (if any) for your new formats.

Paul Riggott
Inspiring
October 19, 2009

Here is an example of saveing the active document to the desktop using openEXR

var saveFile = File("~/desktop/testFile.exr");
saveEXR(saveFile);

function saveEXR(saveFile){
if(activeDocument.bitsPerChannel != BitsPerChannelType.THIRTYTWO){
alert("This document needs to be 32bit before saving as EXR");
return;
}
var idsave = charIDToTypeID( "save" );
    var desc6 = new ActionDescriptor();
    var idAs = charIDToTypeID( "As  " );
    desc6.putString( idAs, "OpenEXR" );
    var idIn = charIDToTypeID( "In  " );
    desc6.putPath( idIn, saveFile );
executeAction( idsave, desc6, DialogModes.NO );
}