1 Reply Latest reply on Jun 6, 2008 11:52 AM by Loic.Aigon

    Activating Layer Compositions in PSD files

      Hi,

      I'm trying to access layer compositions of imported psd graphics. I know how to activate a layer, but got no clou how to get a list of layer compositions, not to say, how to activate a layer composition.

      I don't want to take the hard way: open the image in photoshop, read the layercomps and their layer, copy this state to InDesign.

      Any ideas?

      Best regards

      Stefan
        • 1. Re: Activating Layer Compositions in PSD files
          Loic.Aigon Adobe Community Professional
          Hi hope it helps<br /><br />if(app.selection[0] != null)<br />{<br />     if(app.selection[0].images[0].graphicLayerOptions.graphicLayers.length > 0)<br />     {<br />          var layArr = new Array();<br />          for(i=0; i<app.selection[0].images[0].graphicLayerOptions.graphicLayers.length; i++)<br />          {<br />               if(app.selection[0].images[0].graphicLayerOptions.graphicLayers[i].curre ntVisibility == true)<br />               {<br />                    var activated= "Visible";<br />               }<br />               else<br />               {<br />                    var activated= "Hidden";<br />               }<br />               if(i==0)<br />               {<br />                    var ret = "";<br />               }<br />               else<br />               {<br />                    var ret = "\r";<br />               }<br />               layArr[i] = ret + app.selection[0].images[0].graphicLayerOptions.graphicLayers[i].name + "(" + activated + ")";<br />          }<br />          alert(app.selection[0].images[0].itemLink.name + "\r" + layArr);<br />     }<br />}<br /><br />Loic