Make Background layer and top layer visible
hi,
how save layersets along background layer , top layer.
here script save current active layerset .jpg format when try use (for loop) save layersets 1 one bottom order current turn off's background layer , top layer.
but dont know how run via looping make active layer 1 one along bottom , top layer
anyone on fix script
#target photoshop;
if (app.documents.length > 0) {
var thedoc = app.activedocument;
// getting name , location;
var docname = thedoc.name;
if (docname.indexof(".") != -1) {var basename = docname.match(/(.*)\.[^\.]+$/)[1]}
else {var basename = docname};
// getting location, if unsaved save desktop;
try {var docpath = thedoc.path}
catch (e) {var docpath = "~/desktop"};
// jpg options;
var jpegoptions = new jpegsaveoptions();
jpegoptions.quality = 12;
jpegoptions.embedcolorprofile = true;
jpegoptions.matte = mattetype.none;
//save jpg in layerset name:
thedoc.saveas((new file(docpath+'/'+thedoc.activelayer.name+'.jpg')),jpegoptions,true);
//thanks xbytor;
};
hi. hope helps.
#target photoshop; if (app.documents.length > 0) { var thedoc = app.activedocument; // getting name , location; var docname = thedoc.name; if (docname.indexof(".") != -1) { var basename = docname.match(/(.*)\.[^\.]+$/)[1]; } else { var basename = docname; }; // getting location, if unsaved save desktop; try { var docpath = thedoc.path} catch (e) { var docpath = "~/desktop" }; // var layersets_ = app.activedocument.layersets; (var =0; < layersets_.length; a++) { // turn layersets invisible (var b =0; b < layersets_.length; b++) { layersets_[b].visible = false; } layersets_[a].visible = true; // jpg options; var jpegoptions = new jpegsaveoptions(); jpegoptions.quality = 12; jpegoptions.embedcolorprofile = true; jpegoptions.matte = mattetype.none; //save jpg in layerset name: thedoc.saveas(new file(folder.desktop + '/backup/'+layersets_[a].name+'.jpg'),jpegoptions,true); //thanks xbytor; } };
More discussions in Photoshop Scripting
adobe
Comments
Post a Comment