Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Re: Batch replace smart objects

$
0
0

When replacing a Smart Object all its instances should update indeed.

 

Selecting a Folder instead of Files can be done by changing the corresponding lines to

var theFolder = Folder.selectDialog ("select folder");

if (theFolder) {

var theFiles = theFolder.getFiles(/\.(jpg|tif|eps|psd)$/i)

};

 

Saving jpgs can be done directly or with a function like this:

function SaveJPG(saveFile, jpegQuality){

jpgSaveOptions = new JPEGSaveOptions();

jpgSaveOptions.embedColorProfile = true;

jpgSaveOptions.formatOptions = FormatOptions.STANDARDBASELINE;

jpgSaveOptions.matte = MatteType.NONE;

jpgSaveOptions.quality = jpegQuality; //1-12

activeDocument.saveAs(saveFile, jpgSaveOptions, true,Extension.LOWERCASE);

}

but you need to use the correct path as the »saveFile«-argument.


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>