2 Replies Latest reply on Apr 28, 2010 6:03 PM by Michael L Hale

    Setting a psd layer's visibility with layercomps

    Michael L Hale Level 5

      In the GUI you can set a placed psd layers using layercomps if they are defined in the psd. Is there a way to do that via a script?

       

      I know that I can set each layer's visibility one at a time but I am looking for a way to do so with layercomps.

        • 1. Re: Setting a psd layer's visibility with layercomps
          Kasyan Servetsky Level 5

          I don't think it is possible to do by script — object model doesn't mention layercomps — it should have been in GraphicLayerOption but it's missing. Moreover, there's something totally wrong with GraphicLayer object — the reference lists 19 properties, but I can access only 3 of them: index, name and parent; properties property is a total mess — shows document's properties instead.

          I am on CS3, windows — Could anybody check if this issue has been fixed in CS4/5?

           

          Kasyan

          1 person found this helpful
          • 2. Re: Setting a psd layer's visibility with layercomps
            Michael L Hale Level 5

            Thanks, even if it's not the answer I wanted to hear.

             

            If I don something like this with InDesign CS4 I get about 17 properties. Some of the properties don't mean much to me being new to InDesign scripting. But others like orignialVisibilty, fxLayer, adjustmentLayer, locked, and id seem to do be properties of the Photoshop layer.

             

            var e = app.selection[0].images[0].graphicLayerOptions.graphicLayers[0].properties;
            for (var p in e) {
                alert(p + ': '  + e[p]);
            }