Quantcast
Channel: Adobe Community : Unanswered Discussions - Photoshop
Viewing all articles
Browse latest Browse all 74445

How to make a one-color fill images with masks in documents from our multiple layers ?

$
0
0

Hello everyone!

I`m to open PSD document with same layers. I need to:

1. Save the jpg file (preview) in a certain place

2. All layers with masks to make one-color fill instead of images with masks.

 

Thanks

 

This is way ?

 

var theLayers = collectLayers(app.activeDocument, []);
alert (theLayers.join("\n")); 
function collectLayers (theParent, allLayers) {//---------------------------------------------------if (!allLayers) {var allLayers = new Array}   else{};   for (var m = theParent.layers.length - 1; m >= 0;m--) {      var theLayer = theParent.layers[m];      if (theLayer.typename == "ArtLayer") {           var bar = new Array;           bar = theLayer.bounds           l0= Math.abs(this.app.activeDocument.width - theLayer.bounds[2] - theLayer.bounds[0]);           l1= Math.abs(this.app.activeDocument.height -theLayer.bounds[3] - theLayer.bounds[1]);            if((l0+l1)>0) {// layer mask is set                 // delete this layer                  //create new layer                  //create new mask from array bar                  //fill selection              allLayers.push(theLayer);            }         }     };   return allLayers   }

Viewing all articles
Browse latest Browse all 74445

Trending Articles



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